• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Custom Shader Error: Undefined variable 'environment_rotation'

Community Beginner ,
Nov 30, 2023 Nov 30, 2023

Copy link to clipboard

Copied

Hello!
I am using a custom shader as part of a pipeline and it generates this error, failing to render:

error C1503: [Shader Helpers] .... error C1503: undefined variable "environment_rotation" 

 

I saw one related post that suggests 'environment rotation' variable has been replaced by 'environment_matrix', substituting each instance  then generates a new error:

[Shader Helpers] 5(368) : error C7623: implicit narrowing of type from "vec3" to "float"

I assume this is because the newer environment matrix is a different data type, but some guidance on how to update the .glsl file to work properly would be helpful.

 

I did try one fix that allows the shader to render, replacing 'environment_rotation' with 'uniform_environment_rotation', but I am not sure if this matches the previous shader exactly. 

 

jojocloud_0-1701378793595.png

 

Any tips?

Thanks!

Bug Unresolved
TOPICS
Bugs & Crashes , Scripting

Views

141

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 Comment
Adobe Employee ,
Dec 01, 2023 Dec 01, 2023

Copy link to clipboard

Copied

LATEST

Hi,

 

How were you using the environment_rotation variable previously ? There may not be only one solution to the problem you have.

 

The rotation angle has been changed into a matrix given that the environment map can now be made to follow the camera, so the rotation can happen on 3 axes instead of along a single one like before.

 

You can see how this behavior changed in the lib-env.glsl file inside the worldToEnvSpace() function.

 

Also uniform_environment_rotation is not a variable I'm aware of that we would manage in the application, which means it is likely to be considered like another generic uniform in the shader. It may let the shader compile but will have no effect.

Votes

Translate

Translate

Report

Report
Resources