attribute "view layer" doesn't work in world editor in EEVEE #117694

Closed
opened 2024-01-31 14:29:23 +01:00 by Adriano D'Elia · 5 comments

System Information
Operating system: macOS-14.2.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Max 1.2

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: (newest version of Blender that worked as expected)

Short description of error
the attribute node with type "view layer" doesn't work into the world editor with EEVEE render engine. it show all the viewport purple like a missing texture. It works fine in Cycles instead.
the blend file contain also a material on a cube with similar mix to shown that the property works fine into the shader editor. Changing the view layer, the material will update correctly.

Exact steps for others to reproduce the error

  • go to shading template
  • create a simple custom property on view layer (prop = 1 for example).
  • in world editor duplicate background shader and change color.
  • add an attribute node with type "view layer", into label add the property ["prop"].
  • connect both background shaders in a mix shader with the attribute node as factor.
  • connect the mix shader to world output shader.
  • switch to rendered viewport shading to see the result
**System Information** Operating system: macOS-14.2.1-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 Max 1.2 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: (newest version of Blender that worked as expected) **Short description of error** the attribute node with type "view layer" doesn't work into the world editor with EEVEE render engine. it show all the viewport purple like a missing texture. It works fine in Cycles instead. the blend file contain also a material on a cube with similar mix to shown that the property works fine into the shader editor. Changing the view layer, the material will update correctly. **Exact steps for others to reproduce the error** - go to shading template - create a simple custom property on view layer (prop = 1 for example). - in world editor duplicate background shader and change color. - add an attribute node with type "view layer", into label add the property ["prop"]. - connect both background shaders in a mix shader with the attribute node as factor. - connect the mix shader to world output shader. - switch to rendered viewport shading to see the result
Adriano D'Elia added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2024-01-31 14:29:23 +01:00
Member

This seems to work fine here on linux

**System Information**
Operating system: Linux-6.6.8-200.fc39.x86_64-x86_64-with-glibc2.38 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 545.29.06
version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727`

Does it also fail on MAC in a fresh 4.1 build from https://builder.blender.org/download/daily/ ?

This seems to work fine here on linux ``` **System Information** Operating system: Linux-6.6.8-200.fc39.x86_64-x86_64-with-glibc2.38 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 545.29.06 version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` ``` Does it also fail on MAC in a fresh 4.1 build from https://builder.blender.org/download/daily/ ?
Philipp Oeser added the
Interest
EEVEE & Viewport
Platform
macOS
Interest
EEVEE
labels 2024-01-31 15:03:15 +01:00

Opening the file and switching viewport to Rendered mode makes the background be pink, with the following errors printed to the console:

ERROR (gpu.shader): GPU_material_compile Vertex Shader: 
      | 
      | msl_wrapper_code:5155:14: Error: use of undeclared identifier 'attr_load_color_post'
      | 
      |   out_attr = attr_load_color_post(attr);
      |              ^
      | 
      | msl_wrapper_code:5160:23: Error: use of undeclared identifier 'attr_load_temperature_post'
      | 
      |   float temperature = attr_load_temperature_post(attr.x);
      |                       ^
      | 
      | msl_wrapper_code:5181:14: Error: use of undeclared identifier 'attr_load_uniform'
      | 
      |   out_attr = attr_load_uniform(attr, floatBitsToUint(attr_hash));
      |              ^

ERROR (gpu.shader): GPU_material_compile Vertex Shader: 
      | 
      | msl_wrapper_code:5154:14: Error: use of undeclared identifier 'attr_load_color_post'
      | 
      |   out_attr = attr_load_color_post(attr);
      |              ^
      | 
      | msl_wrapper_code:5159:23: Error: use of undeclared identifier 'attr_load_temperature_post'
      | 
      |   float temperature = attr_load_temperature_post(attr.x);
      |                       ^
      | 
      | msl_wrapper_code:5180:14: Error: use of undeclared identifier 'attr_load_uniform'
      | 
      |   out_attr = attr_load_uniform(attr, floatBitsToUint(attr_hash));
      |              ^
Opening the file and switching viewport to Rendered mode makes the background be pink, with the following errors printed to the console: ``` ERROR (gpu.shader): GPU_material_compile Vertex Shader: | | msl_wrapper_code:5155:14: Error: use of undeclared identifier 'attr_load_color_post' | | out_attr = attr_load_color_post(attr); | ^ | | msl_wrapper_code:5160:23: Error: use of undeclared identifier 'attr_load_temperature_post' | | float temperature = attr_load_temperature_post(attr.x); | ^ | | msl_wrapper_code:5181:14: Error: use of undeclared identifier 'attr_load_uniform' | | out_attr = attr_load_uniform(attr, floatBitsToUint(attr_hash)); | ^ ERROR (gpu.shader): GPU_material_compile Vertex Shader: | | msl_wrapper_code:5154:14: Error: use of undeclared identifier 'attr_load_color_post' | | out_attr = attr_load_color_post(attr); | ^ | | msl_wrapper_code:5159:23: Error: use of undeclared identifier 'attr_load_temperature_post' | | float temperature = attr_load_temperature_post(attr.x); | ^ | | msl_wrapper_code:5180:14: Error: use of undeclared identifier 'attr_load_uniform' | | out_attr = attr_load_uniform(attr, floatBitsToUint(attr_hash)); | ^ ```
Philipp Oeser added
Status
Confirmed
Module
EEVEE & Viewport
and removed
Status
Needs Triage
labels 2024-01-31 15:14:26 +01:00
Author

@lichtwerk @Sergey hi, any update on this?

@lichtwerk @Sergey hi, any update on this?

@AdrianoDElia Not really my area, I was just checking on the report because it was easiest for me to try it on macOS. Once the issue is confirmed, someone from the Eevee module should look into it.

Anyhow, I gave it another test now, and the issue still happens in Eevee. However, in Eevee-Next it seems to work correctly.

@AdrianoDElia Not really my area, I was just checking on the report because it was easiest for me to try it on macOS. Once the issue is confirmed, someone from the Eevee module should look into it. Anyhow, I gave it another test now, and the issue still happens in Eevee. However, in Eevee-Next it seems to work correctly.

I tried to look into it. But I give up after trying to untangle the spaghetti code that is EEVEE nowadays. Given that EEVEE Next is replacing EEVEE and that the issue is not present in the former, I will consider this a known issue and close this report.

I tried to look into it. But I give up after trying to untangle the spaghetti code that is EEVEE nowadays. Given that EEVEE Next is replacing EEVEE and that the issue is not present in the former, I will consider this a known issue and close this report.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-04-24 21:52:30 +02:00
Clément Foucault added
Type
Known Issue
and removed
Type
Report
labels 2024-04-24 21:52:54 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
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, Assets & 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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117694
No description provided.