Description
The following material fails shader compilation:
materials: DefaultMaterial {
id: material
emissiveColor: "white"
lighting: DefaultMaterial.NoLighting
cullingMode: Material.DisableCulling
}
[27464] QSSG.internal_error: Failed to generate fragment shader!! [27464] QSSG.internal_error: Fragment source: [27464] #version 410 [27464] #define texture2D texture [27464] #extension GL_ARB_gpu_shader5 : enable [27464] #extension GL_ARB_shader_image_load_store : enable [27464] #extension GL_ARB_shader_atomic_counters : enable [27464] #extension GL_ARB_shader_storage_buffer_object : enable [27464] #extension GL_KHR_blend_equation_advanced : enable [27464] #if __VERSION__ >= 330 [27464] #define varying in [27464] #define texture2D texture [27464] #define gl_FragColor fragOutput [27464] layout(blend_support_all_equations) out; [27464] out vec4 fragOutput; [27464] #else [27464] #define fragOutput gl_FragData[0] [27464] #endif [27464] //Shader name -mesh subset pipeline-- ;lightCount=0;specularModel=Default;;diffuseMap={;;;;};diffuseMap_swizzle={;;;;};emissiveMap={;;;;};emissiveMap_swizzle={;;;;};specularMap={;;;;};specularMap_swizzle={;;;;};opacityMap={;;;;};opacityMap_swizzle={;;;;};bumpMap={;;;;};bumpMap_swizzle={;;;;};specularAmountMap={;;;;};specularAmountMap_swizzle={;;;;};normalMap={;;;;};normalMap_swizzle={;;;;};displacementMap={;;;;};displacementMap_swizzle={;;;;};translucencyMap={;;;;};translucencyMap_swizzle={;;;;};lightmapIndirect={;;;;};lightmapIndirect_swizzle={;;;;};lightmapRadiosity={;;;;};lightmapRadiosity_swizzle={;;;;};lightmapShadow={;;;;};lightmapShadow_swizzle={;;;;};roughnessMap={;;;;};roughnessMap_swizzle={;;;;};baseColorMap={;;;;};baseColorMap_swizzle={;;;;};metalnessMap={;;;;};metalnessMap_swizzle={;;;;};occlusionMap={;;;;};occlusionMap_swizzle={;;;;};tessellationMode={noTessellation=true;;;};isDoubleSided=true;alphaMode=Default; [27464] #define QSSG_ENABLE_LIGHT_PROBE 0 [27464] #define QSSG_ENABLE_LIGHT_PROBE_2 0 [27464] #define QSSG_ENABLE_IBL_FOV 0 [27464] #define QSSG_ENABLE_SSM 0 [27464] #define QSSG_ENABLE_SSAO 0 [27464] #define QSSG_ENABLE_SSDO 0 [27464] #define QSSG_ENABLE_CG_LIGHTING 0 [27464] [27464] // begin "doubleSided.glsllib" [27464] [27464] // Inverts N when rendering a backface [27464] vec3 adjustNormalForFace(in vec3 N, in vec3 position) [27464] { [27464] vec3 fdx = dFdx(position); [27464] vec3 fdy = dFdy(position); [27464] vec3 faceNormal = normalize(cross(fdx, fdy)); [27464] if (dot (N, faceNormal) < 0.0) { [27464] N *= -1.0; [27464] } [27464] return N; [27464] } [27464] [27464] // end "doubleSided.glsllib" [27464] [27464] [27464] [27464] uniform vec4 material_properties; [27464] uniform vec3 material_diffuse; [27464] uniform vec4 base_color; [27464] [27464] [27464] void main() [27464] { [27464] float object_opacity = material_properties.a; [27464] vec3 vertColor = vec3(1.0); [27464] world_normal = adjustNormalForFace(world_normal, varWorldPos); [27464] [27464] vec3 diffuseColor = base_color.rgb; [27464] vec4 global_diffuse_light = vec4(0.0, 0.0, 0.0, object_opacity * base_color.a); [27464] vec3 global_specular_light = vec3(0.0, 0.0, 0.0); [27464] global_diffuse_light.rgb += diffuseColor.rgb * material_diffuse.rgb; [27464] fragOutput = vec4(clamp(vertColor * global_diffuse_light.xyz + global_specular_light.xyz, 0.0, 65519.0), global_diffuse_light.a); [27464] } [27464] [27464] QSSG.invalid_operation: Fragment compilation output:: 0(53) : error C1503: undefined variable "world_normal" [27464] QSSG.invalid_operation: Fragment compilation output:: 0(53) : error C1503: undefined variable "world_normal" [27464] QSSG.invalid_operation: Fragment compilation output:: 0(53) : error C1503: undefined variable "varWorldPos" [27464] QSSG.invalid_operation: Fragment compilation output::