Sun Position: shader error when enabling on Linux #104407

Closed
opened 2023-02-13 09:59:08 +01:00 by Damien Picard · 1 comment
Member

System Information
Operating system: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: NVIDIA GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 515.86.01

Blender Version
Broken: version: hash 5c22e77ea3
Worked: hash caed9c9da5

Addon Information
Name: Sun Position (3, 2, 1)
Author: Michael Martin

Short description of error
When enabling Sun Position, the following error comes up:

ERROR (gpu.shader): pyGPU_Shader VertShader: 
      | 
   77 | out {
      | 
      | Error: C0000: syntax error, unexpected '{', expecting "::" at token "{"
      | 
   80 | };
      | 
      | Error: C0000: syntax error, unexpected '}' at token "}"
      | 
  117 |             v_StartPos    = (pos / pos.w).xy;
      | 
      | Error: C1503: undefined variable "v_StartPos"

ERROR (gpu.shader): pyGPU_Shader FragShader: 
      | 
   74 | in {
      | 
      | Error: C0000: syntax error, unexpected '{', expecting "::" at token "{"
      | 
   77 | };
      | 
      | Error: C0000: syntax error, unexpected '}' at token "}"
      | 
  117 |             vec2 dir  = (vertPos_2d.xy - v_StartPos.xy) * u_Resolution;
      | 
      | Error: C1503: undefined variable "v_StartPos"

Traceback (most recent call last):
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/modules/addon_utils.py", line 333, in enable
    mod = __import__(module_name)
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/sun_position/__init__.py", line 35, in <module>
    from . import properties, ui_sun, hdr, translations
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/sun_position/properties.py", line 9, in <module>
    from .draw import north_update
  File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/sun_position/draw.py", line 62, in <module>
    shader = gpu.shader.create_from_info(shader_info)
Exception: Shader Compile Error, see console for more details

Exact steps for others to reproduce the error

  • Open Blender on Linux (X11)
  • Enable Sun Position in the preferences.

@mano-wii I tried looking into it but I don’t really know how to debug shader errors—I don’t understand where the syntax error occurs. Do you know where I can find info on that?

**System Information** Operating system: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 64 Bits Graphics card: NVIDIA GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 515.86.01 **Blender Version** Broken: version: hash [5c22e77ea3](https://projects.blender.org/blender/blender-addons/commit/5c22e77ea30327173d542b41dc2f7653f2cb1a7a) Worked: hash [caed9c9da5](https://projects.blender.org/blender/blender-addons/commit/caed9c9da57c5b98e5a374caee1f49f7428e4f59) **Addon Information** Name: Sun Position (3, 2, 1) Author: Michael Martin **Short description of error** When enabling Sun Position, the following error comes up: ``` ERROR (gpu.shader): pyGPU_Shader VertShader: | 77 | out { | | Error: C0000: syntax error, unexpected '{', expecting "::" at token "{" | 80 | }; | | Error: C0000: syntax error, unexpected '}' at token "}" | 117 | v_StartPos = (pos / pos.w).xy; | | Error: C1503: undefined variable "v_StartPos" ERROR (gpu.shader): pyGPU_Shader FragShader: | 74 | in { | | Error: C0000: syntax error, unexpected '{', expecting "::" at token "{" | 77 | }; | | Error: C0000: syntax error, unexpected '}' at token "}" | 117 | vec2 dir = (vertPos_2d.xy - v_StartPos.xy) * u_Resolution; | | Error: C1503: undefined variable "v_StartPos" Traceback (most recent call last): File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/modules/addon_utils.py", line 333, in enable mod = __import__(module_name) File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/sun_position/__init__.py", line 35, in <module> from . import properties, ui_sun, hdr, translations File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/sun_position/properties.py", line 9, in <module> from .draw import north_update File "/home/damien/blender-git/build_linux_release/bin/3.5/scripts/addons/sun_position/draw.py", line 62, in <module> shader = gpu.shader.create_from_info(shader_info) Exception: Shader Compile Error, see console for more details ``` **Exact steps for others to reproduce the error** - Open Blender on Linux (X11) - Enable Sun Position in the preferences. @mano-wii I tried looking into it but I don’t really know how to debug shader errors—I don’t understand where the syntax error occurs. Do you know where I can find info on that?
Damien Picard added the
Type
Report
label 2023-02-13 09:59:08 +01:00
Germano Cavalcante added the
Status
Confirmed
label 2023-02-13 17:38:30 +01:00

I can confirm

I can confirm
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-02-13 17:39:10 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 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-addons#104407
No description provided.