SpiderPig Posted June 7 Share Posted June 7 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? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 7 Share Posted June 7 Upload the shader please? Quote 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 More sharing options...
SpiderPig Posted June 7 Author Share Posted June 7 Sent it to you. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 7 Author Share Posted June 7 Sent you the updated shader and updated this first post to reflect the new errors. Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted June 10 Solution Share Posted June 10 Texture handles are a uvec2, using bindless textures. Just change line 100 to this and it will work: if ( material.textureHandle[ 15 ] != uvec2(0) ) { 1 Quote 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 More sharing options...
SpiderPig Posted June 10 Author Share Posted June 10 Why would this have compiled okay on some GPU's and not on others? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 10 Share Posted June 10 Some GLSL compilers are more strict than others. 1 Quote 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 More sharing options...
SpiderPig Posted June 10 Author Share Posted June 10 Ah okay. Were you able to tell if the error messages were actually showing the correct line? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 10 Share Posted June 10 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. Quote 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 More sharing options...
Josh Posted June 10 Share Posted June 10 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. Quote 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 More sharing options...
SpiderPig Posted June 10 Author Share Posted June 10 Ah okay. For the exact same code the AMD R9 380 said it was at 0:199. That's going make debugging shaders fun if some cards don't give the right info Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 10 Author Share Posted June 10 1 minute ago, Josh said: Also, there is a NULL character at the end of the file, which should not be there. Ah yes I saw that after I gave you the latest code. That's fixed now. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted June 10 Author Share Posted June 10 1 minute ago, Josh said: What GPU is creating this output? It looks like it is not evaluating the #line directive correctly. AMD R9 380 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.