OSL CheckBox socket not working in NodeGroup #106760
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#106760
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10 Home
Graphics card: NVIDIA GeForce MX250
Blender Version
Broken: 3.5.0
Short description of error
OSL CheckBox socket doesn't work if the node is in the NodeGroup
Exact steps for others to reproduce the error
I'm not sure if the socket boolean type is supposed to work in shaders at all...
he is just a translator in 1 and 0, and everything works fantastic !
the only problem is the NodeGroup...
The socket itself is not supported by shaders, and even if it is simply output to the render result, it will be 0 alway. I'm not sure why it is created at all.
I don't understand what the problem is if everything works fine !
and, checkbox is always useful...
this socket exists, and it works, which means that if it stops working somewhere, it is a bug !
I assume this is similar to #106508, so will mark/label the same (TODO)
Still not sure if it should be TODO. In theory, any type of socket from geometry nodes, if created by some kind of hack in the shader, should not work, or this is a legal TODO.
Considering int sockets work fine I see no reason bools shouldnt.
Plus
set_default_value
incycles/kernel/shader.cpp
does actually handle the conversion for bools, so Id assume its an issue with whatever digests the nodetree itself? (my knowledge of blender's source is very rough and limited)@WinNder This is just undefined behavior due to cpu can read 4 byte of float as boolean / 1 byte of boolean as float. But this is not expected. And this shouldn't work to make blender more safe i guess...
I got it to work with EEVEE.
Haven't for Cycles yet, idk how to go about that(EDIT: It was literally one fallthrough case added toconvert_socket_type
incycles/blender/shader.cpp
), but for EEVEE it was mostly just adding a case forSOCK_BOOLEAN
tontree_shader_expand_socket_default
innode_shader_tree.cc
, as well as sprinkling inSOCK_BOOLEAN
whereverSOCK_INT
is.Idk how to submit code though I'll have to read up on that part, sorry.
@Consta thank you very much for your attention and work !