Jump to content

Shader Error, Wrong Information


SpiderPig
 Share

Go to solution Solved by Josh,

Recommended Posts

Getting this shader error;

08/06/2024 00:31:44 : Error: Failed to compile "C:/Program Files (x86)/Steam/steamapps/common/TheSeventhWorld/Materials/DynamicSky/DynamicSky.frag"
08/06/2024 00:31:44 : Fragment shader failed to compile with the following errors:
ERROR: 0:199: error(#162) Wrong operand types: no operation "!=" exists that takes a left-hand operand of type "in mediump 2-component vector of uvec2" and a right operand of type "const int" (or there is no acceptable conversion)
WARNING: 17:1: warning(#62) enable/warn/disable extension is not found. Extension "GL_EXT_multiview" is not supported
ERROR: 17:53: error(#143) Undeclared identifier: GetMaterialTransmission
ERROR: 17:53: error(#202) No matching overloaded function found: GetMaterialTransmission
ERROR: 17:274: error(#162) Wrong operand types: no operation "==" exists that takes a left-hand operand of type "uniform highp sampler2D" and a right operand of type "const int" (or there is no acceptable conversion)
ERROR: 17:289: error(#143) Undeclared identifier: EnvironmentMap_Specular
ERROR: 17:291: error(#143) Undeclared identifier: textureCubeSampler
ERROR: 17:291: error(#166) Integer expression required: []
ERROR: 17:291: error(#145) Left of "[" is not of type array, matrix, or vector: textureCubeSampler
ERROR: 17:291: error(#202) No matching overloaded function found: textureQueryLevels
ERROR: 17:291: error(#160) Cannot convert from: "const float" to: "highp int"
ERROR: 17:293: error(#166) Integer expression required: []
ERROR: 17:293: error(#145) Left of "[" is not of type array, matrix, or vector: textureCubeSampler
ERROR: 17:293: error(#202) No matching overloaded function found: textureLod
ERROR: 17:293: error(#216) Vector field selection out of range "rgb"
ERROR: 17:302: error(#143) Undeclared identifier: texture2DSampler
ERROR: 17:302: error(#166) Integer expression required: []
ERROR: 17:302: error(#145) Left of "[" is not of type array, matrix, or vector: texture2DSampler
ERROR: 17:302: error(#202) No matching overloaded function found: getIBLRadianceGGX
ERROR: 17:309: error(#143) Undeclared identifier: EnvironmentMap_Diffuse
ERROR: 17:311: error(#143) Undeclared identifier: textureCubeSampler
ERROR: 17:311: error(#166) Integer expression required: []
ERROR: 17:311: error(#145) Left of "[" is not of type array, matrix, or vector: textureCubeSampler
ERROR: 17:311: error(#202) No matching overloaded function found: texture
ERROR: 17:311: error(#216) Vector field selection out of range "rgb"
ERROR: 17:319: error(#143) Undeclared identifier: texture2DSampler
ERROR: 17:319: error(#166) Integer expression required: []
ERROR: 17:319: error(#145) Left of "[" is not of type array, matrix, or vector: texture2DSampler
ERROR: 17:319: error(#202) No matching overloaded function found: getIBLRadianceLambertian
ERROR: 17:492: error(#202) No matching overloaded function found: PostFragmentFunction
ERROR: error(#273) 29 compilation errors.  No code generated

On this GPU only;

AMD R9 380

But this is the code at that location and it does not match what the error is saying.  It sounds like a texture ID that used to be an "int" and now is a "uvec2" is being compared wrong but I can't find it!  @Josh Could the 0:199 information be off somehow?  Maybe it's in bytes or character stride instead of the line index?

ShaderBug.thumb.png.52d4cdbb58c3d6cb6cf64160b2d2d01b.png

Link to comment
Share on other sites

  • SpiderPig changed the title to Shader Error, Wrong Information
  • Solution

Texture handles are a uvec2, using bindless textures. Just change line 100 to this and it will work:

	if ( material.textureHandle[ 15 ] != uvec2(0) ) {

 

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

On my AMD 6600 this was the output:

Error: Failed to compile "C:/Users/Josh/Documents/Ultra Engine/Projects/DLCs/Materials/DynamicSky/DynamicSky.frag"
ERROR: 0:100: '!=' :  wrong operand types: no operation '!=' exists that takes a left-hand operand of type ' temp 2-component vector of uint' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:100: '' : missing #endif 
ERROR: 0:100: '' : compilation terminated 
ERROR: 3 compilation errors.  No code generated.

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Also, there is a NULL character at the end of the file, which should not be there.

Ultra creates a shader source code by adding multiple files' contents together. It uses the #line directive to indicate what the current line and file index are, before every single line of code, since it is merging a bunch of different files into a single string.

What GPU is creating this output? It looks like it is not evaluating the #line directive correctly.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...