Page MenuHome

[OCIO V2]: Shader emitted on macOS breaks.
Closed, ResolvedPublic

Description

System Information
Operating system: macOS-12.2.1-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 560 OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.7.103

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-14 19:06, hash: rBfc259d4c30cb
Worked: Likely never.

Short description of error
Shader emits break on macOS.

ERROR (gpu.shader): OCIO_Display FragShader: 
      | 
    1 | #version 330
      |                                                                                                                                                                                                                                                                                                                                                                                                                      ^
      | Error: Use of undeclared identifier 'inf'
      | 
      | #version 330
      |                                                                                                                                                                                                                                                                                                                                                                                                                       ^
      | Error: Use of undeclared identifier 'inf'
      | 
      | #version 330
      |                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
      | Error: Use of undeclared identifier 'clampBlack'
      | Error: Use of undeclared identifier 'clampWhite'

Exact steps for others to reproduce the error

  1. Download testing configuration at https://github.com/sobotka/AgX/tree/grading-primary-config
  2. Change to "Test Bug" look on a render or image load with "View as Render" set.
  3. View output in console.

Event Timeline

Jesse Yurkovich (deadpin) changed the task status from Needs Triage to Needs Information from Developers.Mar 15 2022, 10:22 PM

Waiting to hear back on https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1603 where I responded with some additional information.

Currently testing, but this could be worked around by adding a define for inf to 100000. Will test and provide a patch. we can use until it is fixed upstream.

We can work around this in Blender, but for compatibility with older Blender versions and other apps I suggest to add a finite clamp to grading transform in the config also.

but for compatibility with older Blender versions and other apps I suggest to add a finite clamp to grading transform in the config also.

There is no GradingPrimaryTransform in OCIO V1.

The shader code emitted was also bombing out in Blender, and not working. Filed a bug upstream too, but I’m not entirely sure whether it is Blender or upstream where the problem rests.