Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Loading data from cloud storage
- --------------------------------------------------------
- Files on steam cloud:
- No could files found!
- Time: 0
- --------------------------------------------------------
- Version 1.03
- -------- THE HPL ENGINE LOG ------------
- Creating Engine Modules
- --------------------------------------------------------
- Creating job manager with 7 threads and 1024 jobs
- Creating graphics module
- Creating system module
- Creating resource module
- Creating input module
- Creating sound module
- Creating physics module
- Creating ai module
- Creating gui module
- Creating generate module
- Creating haptic module
- Creating scene module
- Creating script module
- Creating lipsync module
- --------------------------------------------------------
- Initializing Resources Module
- --------------------------------------------------------
- Creating loader handlers
- Creating resource managers
- Adding loaders to handlers
- --------------------------------------------------------
- Initializing Graphics Module
- --------------------------------------------------------
- Init lowlevel graphics: -1x-1 bpp:32 rr: 60 fs:0 ms:0 driver: 0 cap:'SOMA Loading...' pos:(-1x-1)
- Available drivers:
- (0) - 'x11'
- (1) - 'dummy'
- Creating window: (-1,-1) 1920 x 1080 - 32 bpp flags: 4099
- Setting display mode: 1920 x 1080 - 32 bpp 60 hz
- Init Glew...OK
- Setting up OpenGL
- Vendor: X.Org
- Renderer: Gallium 0.4 on AMD TAHITI
- Version: 3.0 Mesa 10.6.9 (git-8957b69)
- Max texture image units: 16
- Max texture coord units: 8
- Max texture buffer size: 2147483647
- Max texture array slices: 2048
- Max user clip planes: 8
- Two sided stencil: 1
- Vertex Buffer Object: 1
- Anisotropic filtering: 1
- Max Anisotropic degree: 16
- Multisampling: 1
- Texture compression: 1
- Texture compression S3TC: 1
- Texture compression 3DC: 1
- Texture sRGB: 1
- Geometry Instancing: 1
- Auto generate MipMaps: 1
- Render to texture: 1
- Max draw buffers: 8
- Max color render targets: 8
- Packed depth-stencil: 1
- Texture float: 1
- GLSL Version: 1.30
- ShaderModel 2: 1
- ShaderModel 3: 1
- ShaderModel 4: 0
- Max vertex uniforms: -1436050114
- Max fragment uniforms: 16384
- OGL ATIFragmentShader: 0
- Tesselation: 0
- MultiBindTex: 1
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Skybox frag
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] uniform mat4 a_mtxInvViewProjection;
- [0015]
- [0016] //---------------------------------------------
- [0017]
- [0018] ///////////////////////////////
- [0019] // Main program
- [0020] in vec4 vtx_vPosition;
- [0021] in vec4 vtx_vColor;
- [0022] out vec4 px_vTexCoord0;
- [0023] out vec4 px_vColor;
- [0024]
- [0025] void main()
- [0026] {
- [0027] int vtx_lVertexID = gl_VertexID;
- [0028] int vtx_lInstanceID = gl_InstanceID;
- [0029]
- [0030] vec4 px_vPosition = vec4(0);
- [0031]
- [0032]
- [0033] ///////////
- [0034] // Fullscreen quad that does not clip geometry
- [0035] px_vPosition = vec4(vtx_vPosition.xy, 1.0f, 1.0f);
- [0036]
- [0037] //////////////////////
- [0038] // Transform the projected position to world space
- [0039] px_vTexCoord0 = ((a_mtxInvViewProjection) * (vtx_vPosition)) * vec4(-1,1,1,1);
- [0040] px_vTexCoord0 /= px_vTexCoord0.w;
- [0041]
- [0042] //////////////////////
- [0043] // Color
- [0044] px_vColor = vtx_vColor;
- [0045]
- [0046] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'base_skybox_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'base_skybox_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] uniform mat4 a_mtxModelViewProjection;
- [0015] uniform mat4 a_mtxModelNormal;
- [0016]
- [0017]
- [0018]
- [0019] //////////////////////////////////////
- [0020] // UV Animation variables
- [0021]
- [0022]
- [0023] //---------------------------------------------
- [0024]
- [0025] ///////////////////////////////
- [0026] // Main program
- [0027] in vec4 vtx_vPosition;
- [0028] in vec4 vtx_vTexCoord0;
- [0029] in vec4 vtx_vTexCoord1;
- [0030] in vec3 vtx_vNormal;
- [0031] in vec4 vtx_vTangent;
- [0032] in vec4 vtx_vColor;
- [0033] out vec4 px_vTexCoord0;
- [0034]
- [0035] void main()
- [0036] {
- [0037] int vtx_lVertexID = gl_VertexID;
- [0038] int vtx_lInstanceID = gl_InstanceID;
- [0039]
- [0040] vec4 px_vPosition = vec4(0);
- [0041]
- [0042]
- [0043] vec4 vLocalVertexPos = vtx_vPosition;
- [0044] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0045]
- [0046] //////////////////////
- [0047] // Uv
- [0048]
- [0049]
- [0050] //////////////////////
- [0051] // Color
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059] //////////////////////
- [0060] // Normals
- [0061]
- [0062]
- [0063] //////////////////////
- [0064] // Normalmapping
- [0065]
- [0066]
- [0067] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Skybox frag
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] uniform mat4 a_mtxInvViewProjection;
- [0015]
- [0016] //---------------------------------------------
- [0017]
- [0018] ///////////////////////////////
- [0019] // Main program
- [0020] in vec4 vtx_vPosition;
- [0021] in vec4 vtx_vColor;
- [0022] out vec4 px_vTexCoord0;
- [0023] out vec4 px_vColor;
- [0024]
- [0025] void main()
- [0026] {
- [0027] int vtx_lVertexID = gl_VertexID;
- [0028] int vtx_lInstanceID = gl_InstanceID;
- [0029]
- [0030] vec4 px_vPosition = vec4(0);
- [0031]
- [0032]
- [0033] ///////////
- [0034] // Fullscreen quad that does not clip geometry
- [0035] px_vPosition = vec4(vtx_vPosition.xy, 1.0f, 1.0f);
- [0036]
- [0037] //////////////////////
- [0038] // Transform the projected position to world space
- [0039] px_vTexCoord0 = ((a_mtxInvViewProjection) * (vtx_vPosition)) * vec4(-1,1,1,1);
- [0040] px_vTexCoord0 /= px_vTexCoord0.w;
- [0041]
- [0042] //////////////////////
- [0043] // Color
- [0044] px_vColor = vtx_vColor;
- [0045]
- [0046] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'base_skybox_vtx.hpsl'
- ERROR: Could not load program manager 'WireFrame' shader 'base_skybox_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'WireFrame' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] uniform mat4 a_mtxModelViewProjection;
- [0015] uniform mat4 a_mtxModelNormal;
- [0016]
- [0017]
- [0018]
- [0019] //////////////////////////////////////
- [0020] // UV Animation variables
- [0021]
- [0022]
- [0023] //---------------------------------------------
- [0024]
- [0025] ///////////////////////////////
- [0026] // Main program
- [0027] in vec4 vtx_vPosition;
- [0028] in vec4 vtx_vTexCoord0;
- [0029] in vec4 vtx_vTexCoord1;
- [0030] in vec3 vtx_vNormal;
- [0031] in vec4 vtx_vTangent;
- [0032] in vec4 vtx_vColor;
- [0033] out vec4 px_vTexCoord0;
- [0034]
- [0035] void main()
- [0036] {
- [0037] int vtx_lVertexID = gl_VertexID;
- [0038] int vtx_lInstanceID = gl_InstanceID;
- [0039]
- [0040] vec4 px_vPosition = vec4(0);
- [0041]
- [0042]
- [0043] vec4 vLocalVertexPos = vtx_vPosition;
- [0044] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0045]
- [0046] //////////////////////
- [0047] // Uv
- [0048]
- [0049]
- [0050] //////////////////////
- [0051] // Color
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059] //////////////////////
- [0060] // Normals
- [0061]
- [0062]
- [0063] //////////////////////
- [0064] // Normalmapping
- [0065]
- [0066]
- [0067] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'base_vtx.hpsl'
- ERROR: Could not load program manager 'WireFrame' shader 'base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Skybox frag
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] uniform mat4 a_mtxInvViewProjection;
- [0015]
- [0016] //---------------------------------------------
- [0017]
- [0018] ///////////////////////////////
- [0019] // Main program
- [0020] in vec4 vtx_vPosition;
- [0021] in vec4 vtx_vColor;
- [0022] out vec4 px_vTexCoord0;
- [0023] out vec4 px_vColor;
- [0024]
- [0025] void main()
- [0026] {
- [0027] int vtx_lVertexID = gl_VertexID;
- [0028] int vtx_lInstanceID = gl_InstanceID;
- [0029]
- [0030] vec4 px_vPosition = vec4(0);
- [0031]
- [0032]
- [0033] ///////////
- [0034] // Fullscreen quad that does not clip geometry
- [0035] px_vPosition = vec4(vtx_vPosition.xy, 1.0f, 1.0f);
- [0036]
- [0037] //////////////////////
- [0038] // Transform the projected position to world space
- [0039] px_vTexCoord0 = ((a_mtxInvViewProjection) * (vtx_vPosition)) * vec4(-1,1,1,1);
- [0040] px_vTexCoord0 /= px_vTexCoord0.w;
- [0041]
- [0042] //////////////////////
- [0043] // Color
- [0044] px_vColor = vtx_vColor;
- [0045]
- [0046] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'base_skybox_vtx.hpsl'
- ERROR: Could not load program manager 'Simple' shader 'base_skybox_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Simple' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] uniform mat4 a_mtxModelViewProjection;
- [0015] uniform mat4 a_mtxModelNormal;
- [0016]
- [0017]
- [0018]
- [0019] //////////////////////////////////////
- [0020] // UV Animation variables
- [0021]
- [0022]
- [0023] //---------------------------------------------
- [0024]
- [0025] ///////////////////////////////
- [0026] // Main program
- [0027] in vec4 vtx_vPosition;
- [0028] in vec4 vtx_vTexCoord0;
- [0029] in vec4 vtx_vTexCoord1;
- [0030] in vec3 vtx_vNormal;
- [0031] in vec4 vtx_vTangent;
- [0032] in vec4 vtx_vColor;
- [0033] out vec4 px_vTexCoord0;
- [0034]
- [0035] void main()
- [0036] {
- [0037] int vtx_lVertexID = gl_VertexID;
- [0038] int vtx_lInstanceID = gl_InstanceID;
- [0039]
- [0040] vec4 px_vPosition = vec4(0);
- [0041]
- [0042]
- [0043] vec4 vLocalVertexPos = vtx_vPosition;
- [0044] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0045]
- [0046] //////////////////////
- [0047] // Uv
- [0048]
- [0049]
- [0050] //////////////////////
- [0051] // Color
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059] //////////////////////
- [0060] // Normals
- [0061]
- [0062]
- [0063] //////////////////////
- [0064] // Normalmapping
- [0065]
- [0066]
- [0067] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'base_vtx.hpsl'
- ERROR: Could not load program manager 'Simple' shader 'base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027]
- [0028] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'posteffect_quad_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'posteffect_quad_vtx.hpsl'
- Initializing DevIL
- Vendor String: Abysmal Software
- Version String: Developer's Image Library (DevIL) 1.7.8
- Version Number: 178
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Base - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012]
- [0013]
- [0014]
- [0015] ////////////////////////
- [0016] // TEMP BACKWARD COMBATABILITY BELOW;
- [0017]
- [0018]
- [0019]
- [0020]
- [0021]
- [0022]
- [0023]
- [0024]
- [0025]
- [0026]
- [0027]
- [0028]
- [0029]
- [0030]
- [0031]
- [0032]
- [0033]
- [0034]
- [0035]
- [0036]
- [0037]
- [0038]
- [0039]
- [0040]
- [0041]
- [0042]
- [0043]
- [0044]
- [0045]
- [0046]
- [0047]
- [0048]
- [0049]
- [0050]
- [0051]
- [0052]
- [0053]
- [0054]
- [0055]
- [0056]
- [0057]
- [0058]
- [0059]
- [0060]
- [0061]
- [0062]
- [0063]
- [0064]
- [0065]
- [0066]
- [0067]
- [0068]
- [0069]
- [0070]
- [0071]
- [0072]
- [0073]
- [0074]
- [0075]
- [0076]
- [0077]
- [0078]
- [0079]
- [0080]
- [0081]
- [0082]
- [0083]
- [0084]
- [0085]
- [0086]
- [0087]
- [0088] //---------------------------------------------
- [0089]
- [0090]
- [0091]
- [0092] //---------------------------------------------
- [0093]
- [0094] //////////////////
- [0095] // Arguments
- [0096] layout(std140) uniform cVertexArguments //make sure the struct in c++ has the same layout!
- [0097] {
- [0098] //////////////
- [0099] // Default input
- [0100] mat4 a_mtxProjection;
- [0101] mat4 a_mtxModelViewProjection;
- [0102] mat4 a_mtxModelView;
- [0103] mat4 a_mtxUV;
- [0104] mat4 a_mtxModel;
- [0105] mat4 a_mtxNormal;
- [0106]
- [0107]
- [0108] };
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114] ///////////////////////
- [0115] // Mesh instancing
- [0116]
- [0117]
- [0118]
- [0119]
- [0120] //---------------------------------------------
- [0121]
- [0122] ///////////////////////////////
- [0123] // Main program
- [0124] in vec4 vtx_vPosition;
- [0125] in vec4 vtx_vTexCoord0;
- [0126] in vec4 vtx_vTexCoord1;
- [0127] in vec3 vtx_vNormal;
- [0128] in vec4 vtx_vTangent;
- [0129] in vec4 vtx_vColor;
- [0130] in vec4 vtx_vBoneIndices;
- [0131] in vec4 vtx_vBoneWeight;
- [0132]
- [0133] void main()
- [0134] {
- [0135] int vtx_lVertexID = gl_VertexID;
- [0136] int vtx_lInstanceID = gl_InstanceID;
- [0137]
- [0138] vec4 px_vPosition = vec4(0);
- [0139]
- [0140]
- [0141] /////////////
- [0142] // load instance data
- [0143]
- [0144]
- [0145]
- [0146]
- [0147] //////////////////////
- [0148] // Position - Skeleton
- [0149]
- [0150] vec4 vLocalVertexPos = vec4(vtx_vPosition.xyz, 1.0);
- [0151] px_vPosition = ((a_mtxModelViewProjection) * (vLocalVertexPos));
- [0152]
- [0153]
- [0154] //////////////////////
- [0155] // Uv
- [0156]
- [0157]
- [0158] //////////////////////
- [0159] // Color
- [0160]
- [0161]
- [0162]
- [0163]
- [0164]
- [0165]
- [0166]
- [0167]
- [0168] mat3 mtxNormal = mat3(a_mtxNormal);
- [0169]
- [0170]
- [0171] //////////////////////
- [0172] // Normals
- [0173]
- [0174]
- [0175] //////////////////////
- [0176] // Normalmapping
- [0177]
- [0178]
- [0179] //////////////////////
- [0180] // Parallax
- [0181]
- [0182]
- [0183]
- [0184] /////////
- [0185] // Angle fade
- [0186]
- [0187]
- [0188]
- [0189] //////////////////////
- [0190] // Linear depth
- [0191]
- [0192]
- [0193] //////////////////////
- [0194] // Vertex Position
- [0195]
- [0196]
- [0197] ////////////////////
- [0198] // Scrolling noise
- [0199]
- [0200]
- [0201] //////////////////////
- [0202] // Deferring (Lights)
- [0203]
- [0204]
- [0205] gl_Position = px_vPosition;
- [0206] }
- [0207]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_base_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_base_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Light - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] //////////////////
- [0015] // Arguments
- [0016]
- [0017] layout(std140, binding = 0) uniform cLightArguments
- [0018] {
- [0019] mat4 a_mtxViewProjection;
- [0020] mat4 a_mtxProjection;
- [0021] mat4 a_mtxView;
- [0022] mat4 a_mtxInvViewProjection;
- [0023] mat4 a_mtxInvProjection;
- [0024] mat4 a_mtxInvView;
- [0025]
- [0026] float afFarPlane;
- [0027] float afNearPlane;
- [0028] float afNearByFarPlane;
- [0029] float afInvFarPlane;
- [0030]
- [0031] vec4 avScreenToFarPlane;
- [0032] vec2 avInvScreenSize;
- [0033]
- [0034] vec2 avFogStartAndLength;
- [0035] vec4 avFogColor;
- [0036]
- [0037] vec3 avViewSpaceUp;
- [0038] float afFogFalloffExp;
- [0039]
- [0040] int alInstanceOffset;
- [0041] int alInstanceStride;
- [0042] vec2 avPadding;
- [0043]
- [0044]
- [0045] };
- [0046]
- [0047]
- [0048] ///////////////////////
- [0049] // Instancing
- [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
- [0051]
- [0052] //---------------------------------------------
- [0053]
- [0054] ///////////////////////////////
- [0055] // Main program
- [0056] in vec4 vtx_vPosition;
- [0057] out vec3 px_vBoxCenter;
- [0058] out vec3 px_vBoxExtent;
- [0059] out vec4 px_vSkyColor;
- [0060] out vec4 px_vGroundColor;
- [0061] out float px_fFalloff;
- [0062] out float px_fBevel;
- [0063] out float px_fWeight;
- [0064]
- [0065] void main()
- [0066] {
- [0067] int vtx_lVertexID = gl_VertexID;
- [0068] int vtx_lInstanceID = gl_InstanceID;
- [0069]
- [0070] vec4 px_vPosition = vec4(0);
- [0071]
- [0072]
- [0073] /////////////
- [0074] // load instance data
- [0075] vec4 vSample;
- [0076] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
- [0077]
- [0078]
- [0079] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
- [0080] texelFetch(aInstanceBuffer, lBaseOffset + 1),
- [0081] texelFetch(aInstanceBuffer, lBaseOffset + 2),
- [0082] texelFetch(aInstanceBuffer, lBaseOffset + 3));
- [0083]
- [0084]
- [0085]
- [0086] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
- [0087] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
- [0088] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
- [0089] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
- [0090]
- [0091] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
- [0092] px_fFalloff = vSample.x;
- [0093] px_fBevel = vSample.y;
- [0094] px_fWeight = vSample.z;
- [0095]
- [0096] lBaseOffset += 9;
- [0097]
- [0098]
- [0099]
- [0100]
- [0101]
- [0102]
- [0103]
- [0104]
- [0105]
- [0106]
- [0107]
- [0108]
- [0109]
- [0110] ///////////
- [0111] // Apply model matrix for instance
- [0112] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
- [0113] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
- [0114]
- [0115]
- [0116] gl_Position = px_vPosition;
- [0117] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Light - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] //////////////////
- [0015] // Arguments
- [0016]
- [0017] layout(std140, binding = 0) uniform cLightArguments
- [0018] {
- [0019] mat4 a_mtxViewProjection;
- [0020] mat4 a_mtxProjection;
- [0021] mat4 a_mtxView;
- [0022] mat4 a_mtxInvViewProjection;
- [0023] mat4 a_mtxInvProjection;
- [0024] mat4 a_mtxInvView;
- [0025]
- [0026] float afFarPlane;
- [0027] float afNearPlane;
- [0028] float afNearByFarPlane;
- [0029] float afInvFarPlane;
- [0030]
- [0031] vec4 avScreenToFarPlane;
- [0032] vec2 avInvScreenSize;
- [0033]
- [0034] vec2 avFogStartAndLength;
- [0035] vec4 avFogColor;
- [0036]
- [0037] vec3 avViewSpaceUp;
- [0038] float afFogFalloffExp;
- [0039]
- [0040] int alInstanceOffset;
- [0041] int alInstanceStride;
- [0042] vec2 avPadding;
- [0043]
- [0044]
- [0045] };
- [0046]
- [0047]
- [0048] ///////////////////////
- [0049] // Instancing
- [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
- [0051]
- [0052] //---------------------------------------------
- [0053]
- [0054] ///////////////////////////////
- [0055] // Main program
- [0056] in vec4 vtx_vPosition;
- [0057] out vec3 px_vBoxCenter;
- [0058] out vec3 px_vBoxExtent;
- [0059] out vec4 px_vSkyColor;
- [0060] out vec4 px_vGroundColor;
- [0061] out float px_fFalloff;
- [0062] out float px_fBevel;
- [0063] out float px_fWeight;
- [0064] out vec4 px_vBands[9];
- [0065]
- [0066] void main()
- [0067] {
- [0068] int vtx_lVertexID = gl_VertexID;
- [0069] int vtx_lInstanceID = gl_InstanceID;
- [0070]
- [0071] vec4 px_vPosition = vec4(0);
- [0072]
- [0073]
- [0074] /////////////
- [0075] // load instance data
- [0076] vec4 vSample;
- [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
- [0078]
- [0079]
- [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
- [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
- [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
- [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
- [0084]
- [0085]
- [0086]
- [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
- [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
- [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
- [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
- [0091]
- [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
- [0093] px_fFalloff = vSample.x;
- [0094] px_fBevel = vSample.y;
- [0095] px_fWeight = vSample.z;
- [0096]
- [0097] lBaseOffset += 9;
- [0098]
- [0099]
- [0100]
- [0101]
- [0102]
- [0103]
- [0104]
- [0105] //todo: load this in pixel shader?
- [0106] for(int i = 0; i < 9; ++i) px_vBands[i] = texelFetch(aInstanceBuffer, lBaseOffset+i);
- [0107] lBaseOffset += 9;
- [0108]
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114]
- [0115] ///////////
- [0116] // Apply model matrix for instance
- [0117] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
- [0118] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
- [0119]
- [0120]
- [0121] gl_Position = px_vPosition;
- [0122] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Light - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] //////////////////
- [0015] // Arguments
- [0016]
- [0017] layout(std140, binding = 0) uniform cLightArguments
- [0018] {
- [0019] mat4 a_mtxViewProjection;
- [0020] mat4 a_mtxProjection;
- [0021] mat4 a_mtxView;
- [0022] mat4 a_mtxInvViewProjection;
- [0023] mat4 a_mtxInvProjection;
- [0024] mat4 a_mtxInvView;
- [0025]
- [0026] float afFarPlane;
- [0027] float afNearPlane;
- [0028] float afNearByFarPlane;
- [0029] float afInvFarPlane;
- [0030]
- [0031] vec4 avScreenToFarPlane;
- [0032] vec2 avInvScreenSize;
- [0033]
- [0034] vec2 avFogStartAndLength;
- [0035] vec4 avFogColor;
- [0036]
- [0037] vec3 avViewSpaceUp;
- [0038] float afFogFalloffExp;
- [0039]
- [0040] int alInstanceOffset;
- [0041] int alInstanceStride;
- [0042] vec2 avPadding;
- [0043]
- [0044]
- [0045] };
- [0046]
- [0047]
- [0048] ///////////////////////
- [0049] // Instancing
- [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
- [0051]
- [0052] //---------------------------------------------
- [0053]
- [0054] ///////////////////////////////
- [0055] // Main program
- [0056] in vec4 vtx_vPosition;
- [0057] out vec3 px_vBoxCenter;
- [0058] out vec3 px_vBoxExtent;
- [0059] out vec4 px_vSkyColor;
- [0060] out vec4 px_vGroundColor;
- [0061] out float px_fFalloff;
- [0062] out float px_fBevel;
- [0063] out float px_fWeight;
- [0064]
- [0065] void main()
- [0066] {
- [0067] int vtx_lVertexID = gl_VertexID;
- [0068] int vtx_lInstanceID = gl_InstanceID;
- [0069]
- [0070] vec4 px_vPosition = vec4(0);
- [0071]
- [0072]
- [0073] /////////////
- [0074] // load instance data
- [0075] vec4 vSample;
- [0076] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
- [0077]
- [0078]
- [0079] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
- [0080] texelFetch(aInstanceBuffer, lBaseOffset + 1),
- [0081] texelFetch(aInstanceBuffer, lBaseOffset + 2),
- [0082] texelFetch(aInstanceBuffer, lBaseOffset + 3));
- [0083]
- [0084]
- [0085]
- [0086] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
- [0087] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
- [0088] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
- [0089] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
- [0090]
- [0091] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
- [0092] px_fFalloff = vSample.x;
- [0093] px_fBevel = vSample.y;
- [0094] px_fWeight = vSample.z;
- [0095]
- [0096] lBaseOffset += 9;
- [0097]
- [0098]
- [0099]
- [0100]
- [0101]
- [0102]
- [0103]
- [0104]
- [0105]
- [0106]
- [0107]
- [0108]
- [0109]
- [0110] ///////////
- [0111] // Apply model matrix for instance
- [0112] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
- [0113] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
- [0114]
- [0115]
- [0116] gl_Position = px_vPosition;
- [0117] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Light - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] //////////////////
- [0015] // Arguments
- [0016]
- [0017] layout(std140, binding = 0) uniform cLightArguments
- [0018] {
- [0019] mat4 a_mtxViewProjection;
- [0020] mat4 a_mtxProjection;
- [0021] mat4 a_mtxView;
- [0022] mat4 a_mtxInvViewProjection;
- [0023] mat4 a_mtxInvProjection;
- [0024] mat4 a_mtxInvView;
- [0025]
- [0026] float afFarPlane;
- [0027] float afNearPlane;
- [0028] float afNearByFarPlane;
- [0029] float afInvFarPlane;
- [0030]
- [0031] vec4 avScreenToFarPlane;
- [0032] vec2 avInvScreenSize;
- [0033]
- [0034] vec2 avFogStartAndLength;
- [0035] vec4 avFogColor;
- [0036]
- [0037] vec3 avViewSpaceUp;
- [0038] float afFogFalloffExp;
- [0039]
- [0040] int alInstanceOffset;
- [0041] int alInstanceStride;
- [0042] vec2 avPadding;
- [0043]
- [0044]
- [0045] };
- [0046]
- [0047]
- [0048] ///////////////////////
- [0049] // Instancing
- [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
- [0051]
- [0052] //---------------------------------------------
- [0053]
- [0054] ///////////////////////////////
- [0055] // Main program
- [0056] in vec4 vtx_vPosition;
- [0057] out vec3 px_vBoxCenter;
- [0058] out vec3 px_vBoxExtent;
- [0059] out vec4 px_vSkyColor;
- [0060] out vec4 px_vGroundColor;
- [0061] out float px_fFalloff;
- [0062] out float px_fBevel;
- [0063] out float px_fWeight;
- [0064] out vec4 px_vBands[9];
- [0065]
- [0066] void main()
- [0067] {
- [0068] int vtx_lVertexID = gl_VertexID;
- [0069] int vtx_lInstanceID = gl_InstanceID;
- [0070]
- [0071] vec4 px_vPosition = vec4(0);
- [0072]
- [0073]
- [0074] /////////////
- [0075] // load instance data
- [0076] vec4 vSample;
- [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
- [0078]
- [0079]
- [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
- [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
- [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
- [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
- [0084]
- [0085]
- [0086]
- [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
- [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
- [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
- [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
- [0091]
- [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
- [0093] px_fFalloff = vSample.x;
- [0094] px_fBevel = vSample.y;
- [0095] px_fWeight = vSample.z;
- [0096]
- [0097] lBaseOffset += 9;
- [0098]
- [0099]
- [0100]
- [0101]
- [0102]
- [0103]
- [0104]
- [0105] //todo: load this in pixel shader?
- [0106] for(int i = 0; i < 9; ++i) px_vBands[i] = texelFetch(aInstanceBuffer, lBaseOffset+i);
- [0107] lBaseOffset += 9;
- [0108]
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114]
- [0115] ///////////
- [0116] // Apply model matrix for instance
- [0117] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
- [0118] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
- [0119]
- [0120]
- [0121] gl_Position = px_vPosition;
- [0122] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Light - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] //////////////////
- [0015] // Arguments
- [0016]
- [0017] layout(std140, binding = 0) uniform cLightArguments
- [0018] {
- [0019] mat4 a_mtxViewProjection;
- [0020] mat4 a_mtxProjection;
- [0021] mat4 a_mtxView;
- [0022] mat4 a_mtxInvViewProjection;
- [0023] mat4 a_mtxInvProjection;
- [0024] mat4 a_mtxInvView;
- [0025]
- [0026] float afFarPlane;
- [0027] float afNearPlane;
- [0028] float afNearByFarPlane;
- [0029] float afInvFarPlane;
- [0030]
- [0031] vec4 avScreenToFarPlane;
- [0032] vec2 avInvScreenSize;
- [0033]
- [0034] vec2 avFogStartAndLength;
- [0035] vec4 avFogColor;
- [0036]
- [0037] vec3 avViewSpaceUp;
- [0038] float afFogFalloffExp;
- [0039]
- [0040] int alInstanceOffset;
- [0041] int alInstanceStride;
- [0042] vec2 avPadding;
- [0043]
- [0044]
- [0045] };
- [0046]
- [0047]
- [0048] ///////////////////////
- [0049] // Instancing
- [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
- [0051]
- [0052] //---------------------------------------------
- [0053]
- [0054] ///////////////////////////////
- [0055] // Main program
- [0056] in vec4 vtx_vPosition;
- [0057] out vec3 px_vBoxCenter;
- [0058] out vec3 px_vBoxExtent;
- [0059] out vec4 px_vSkyColor;
- [0060] out vec4 px_vGroundColor;
- [0061] out float px_fFalloff;
- [0062] out float px_fBevel;
- [0063] out float px_fWeight;
- [0064]
- [0065] void main()
- [0066] {
- [0067] int vtx_lVertexID = gl_VertexID;
- [0068] int vtx_lInstanceID = gl_InstanceID;
- [0069]
- [0070] vec4 px_vPosition = vec4(0);
- [0071]
- [0072]
- [0073] /////////////
- [0074] // load instance data
- [0075] vec4 vSample;
- [0076] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
- [0077]
- [0078]
- [0079] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
- [0080] texelFetch(aInstanceBuffer, lBaseOffset + 1),
- [0081] texelFetch(aInstanceBuffer, lBaseOffset + 2),
- [0082] texelFetch(aInstanceBuffer, lBaseOffset + 3));
- [0083]
- [0084]
- [0085]
- [0086] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
- [0087] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
- [0088] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
- [0089] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
- [0090]
- [0091] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
- [0092] px_fFalloff = vSample.x;
- [0093] px_fBevel = vSample.y;
- [0094] px_fWeight = vSample.z;
- [0095]
- [0096] lBaseOffset += 9;
- [0097]
- [0098]
- [0099]
- [0100]
- [0101]
- [0102]
- [0103]
- [0104]
- [0105]
- [0106]
- [0107]
- [0108]
- [0109]
- [0110] ///////////
- [0111] // Apply model matrix for instance
- [0112] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
- [0113] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
- [0114]
- [0115]
- [0116] gl_Position = px_vPosition;
- [0117] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Light - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] //////////////////
- [0015] // Arguments
- [0016]
- [0017] layout(std140, binding = 0) uniform cLightArguments
- [0018] {
- [0019] mat4 a_mtxViewProjection;
- [0020] mat4 a_mtxProjection;
- [0021] mat4 a_mtxView;
- [0022] mat4 a_mtxInvViewProjection;
- [0023] mat4 a_mtxInvProjection;
- [0024] mat4 a_mtxInvView;
- [0025]
- [0026] float afFarPlane;
- [0027] float afNearPlane;
- [0028] float afNearByFarPlane;
- [0029] float afInvFarPlane;
- [0030]
- [0031] vec4 avScreenToFarPlane;
- [0032] vec2 avInvScreenSize;
- [0033]
- [0034] vec2 avFogStartAndLength;
- [0035] vec4 avFogColor;
- [0036]
- [0037] vec3 avViewSpaceUp;
- [0038] float afFogFalloffExp;
- [0039]
- [0040] int alInstanceOffset;
- [0041] int alInstanceStride;
- [0042] vec2 avPadding;
- [0043]
- [0044]
- [0045] };
- [0046]
- [0047]
- [0048] ///////////////////////
- [0049] // Instancing
- [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
- [0051]
- [0052] //---------------------------------------------
- [0053]
- [0054] ///////////////////////////////
- [0055] // Main program
- [0056] in vec4 vtx_vPosition;
- [0057] out vec3 px_vBoxCenter;
- [0058] out vec3 px_vBoxExtent;
- [0059] out vec4 px_vSkyColor;
- [0060] out vec4 px_vGroundColor;
- [0061] out float px_fFalloff;
- [0062] out float px_fBevel;
- [0063] out float px_fWeight;
- [0064] out vec4 px_vBands[9];
- [0065]
- [0066] void main()
- [0067] {
- [0068] int vtx_lVertexID = gl_VertexID;
- [0069] int vtx_lInstanceID = gl_InstanceID;
- [0070]
- [0071] vec4 px_vPosition = vec4(0);
- [0072]
- [0073]
- [0074] /////////////
- [0075] // load instance data
- [0076] vec4 vSample;
- [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
- [0078]
- [0079]
- [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
- [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
- [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
- [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
- [0084]
- [0085]
- [0086]
- [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
- [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
- [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
- [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
- [0091]
- [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
- [0093] px_fFalloff = vSample.x;
- [0094] px_fBevel = vSample.y;
- [0095] px_fWeight = vSample.z;
- [0096]
- [0097] lBaseOffset += 9;
- [0098]
- [0099]
- [0100]
- [0101]
- [0102]
- [0103]
- [0104]
- [0105] //todo: load this in pixel shader?
- [0106] for(int i = 0; i < 9; ++i) px_vBands[i] = texelFetch(aInstanceBuffer, lBaseOffset+i);
- [0107] lBaseOffset += 9;
- [0108]
- [0109]
- [0110]
- [0111]
- [0112]
- [0113]
- [0114]
- [0115] ///////////
- [0116] // Apply model matrix for instance
- [0117] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
- [0118] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
- [0119]
- [0120]
- [0121] gl_Position = px_vPosition;
- [0122] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] ////////////////////////////////////////////////////////
- [0007] // Deferred Light - Vertex Shader
- [0008] //
- [0009] //
- [0010] ////////////////////////////////////////////////////////
- [0011]
- [0012] //---------------------------------------------
- [0013]
- [0014] //////////////////
- [0015] // Arguments
- [0016]
- [0017] layout(std140, binding = 0) uniform cLightArguments
- [0018] {
- [0019] mat4 a_mtxViewProjection;
- [0020] mat4 a_mtxProjection;
- [0021] mat4 a_mtxView;
- [0022] mat4 a_mtxInvViewProjection;
- [0023] mat4 a_mtxInvProjection;
- [0024] mat4 a_mtxInvView;
- [0025]
- [0026] float afFarPlane;
- [0027] float afNearPlane;
- [0028] float afNearByFarPlane;
- [0029] float afInvFarPlane;
- [0030]
- [0031] vec4 avScreenToFarPlane;
- [0032] vec2 avInvScreenSize;
- [0033]
- [0034] vec2 avFogStartAndLength;
- [0035] vec4 avFogColor;
- [0036]
- [0037] vec3 avViewSpaceUp;
- [0038] float afFogFalloffExp;
- [0039]
- [0040] int alInstanceOffset;
- [0041] int alInstanceStride;
- [0042] vec2 avPadding;
- [0043]
- [0044]
- [0045] };
- [0046]
- [0047]
- [0048] ///////////////////////
- [0049] // Instancing
- [0050] layout(binding = 15) uniform samplerBuffer aInstanceBuffer;
- [0051]
- [0052] //---------------------------------------------
- [0053]
- [0054] ///////////////////////////////
- [0055] // Main program
- [0056] in vec4 vtx_vPosition;
- [0057] out vec3 px_vBoxCenter;
- [0058] out vec3 px_vBoxExtent;
- [0059] out vec4 px_vSkyColor;
- [0060] out vec4 px_vGroundColor;
- [0061] out float px_fFalloff;
- [0062] out float px_fBevel;
- [0063] out float px_fWeight;
- [0064] out float px_fComplexity;
- [0065]
- [0066] void main()
- [0067] {
- [0068] int vtx_lVertexID = gl_VertexID;
- [0069] int vtx_lInstanceID = gl_InstanceID;
- [0070]
- [0071] vec4 px_vPosition = vec4(0);
- [0072]
- [0073]
- [0074] /////////////
- [0075] // load instance data
- [0076] vec4 vSample;
- [0077] int lBaseOffset = int(alInstanceOffset + vtx_lInstanceID * alInstanceStride);
- [0078]
- [0079]
- [0080] mat4 mtxModel = mat4(texelFetch(aInstanceBuffer, lBaseOffset),
- [0081] texelFetch(aInstanceBuffer, lBaseOffset + 1),
- [0082] texelFetch(aInstanceBuffer, lBaseOffset + 2),
- [0083] texelFetch(aInstanceBuffer, lBaseOffset + 3));
- [0084]
- [0085]
- [0086]
- [0087] px_vBoxCenter = texelFetch(aInstanceBuffer, lBaseOffset + 4).xyz;
- [0088] px_vBoxExtent = texelFetch(aInstanceBuffer, lBaseOffset + 5).xyz;
- [0089] px_vSkyColor = texelFetch(aInstanceBuffer, lBaseOffset + 6);
- [0090] px_vGroundColor = texelFetch(aInstanceBuffer, lBaseOffset + 7);
- [0091]
- [0092] vSample = texelFetch(aInstanceBuffer, lBaseOffset + 8);
- [0093] px_fFalloff = vSample.x;
- [0094] px_fBevel = vSample.y;
- [0095] px_fWeight = vSample.z;
- [0096]
- [0097] lBaseOffset += 9;
- [0098]
- [0099]
- [0100]
- [0101]
- [0102]
- [0103]
- [0104]
- [0105]
- [0106]
- [0107]
- [0108]
- [0109] px_fComplexity = texelFetch(aInstanceBuffer, lBaseOffset).x;
- [0110]
- [0111]
- [0112]
- [0113] ///////////
- [0114] // Apply model matrix for instance
- [0115] vec4 vLocalVertexPos = ((mtxModel) * (vec4(vtx_vPosition.xyz, 1.0)));
- [0116] px_vPosition = ((a_mtxViewProjection) * (vLocalVertexPos));
- [0117]
- [0118]
- [0119] gl_Position = px_vPosition;
- [0120] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_light_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_light_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Could not load program manager 'Deferred' shader 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] ////////////////////////////////////////////////////////
- [0006] // Deferred Depth unpack - Fragment Shader
- [0007] //
- [0008] // Unpacks the depth map of the gbuffer into the red channel.
- [0009] ////////////////////////////////////////////////////////
- [0010]
- [0011] //---------------------------------------------------------
- [0012]
- [0013] layout(binding = 0) uniform sampler2D depthTexture;
- [0014]
- [0015] in vec4 px_vPosition;
- [0016] in vec4 px_vTexCoord0;
- [0017] layout(location = 0) out vec4 out_vColor;
- [0018]
- [0019] void main()
- [0020] {
- [0021] vec4 px_vPosition = gl_FragCoord;
- [0022] bool px_bFrontFacing = gl_FrontFacing;
- [0023] int px_lPrimitiveID = gl_PrimitiveID;
- [0024]
- [0025]
- [0026]
- [0027] out_vColor = texture(depthTexture, px_vTexCoord0.xy).wwww;
- [0028] }
- [0029]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_unpack_depth_frag.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] ////////////////////////////////////////////////////////
- [0006] // Deferred Depth unpack - Fragment Shader
- [0007] //
- [0008] // Unpacks the depth map of the gbuffer into the red channel.
- [0009] ////////////////////////////////////////////////////////
- [0010]
- [0011] layout(binding = 0) uniform sampler2D depthTexture;
- [0012]
- [0013] uniform vec2 avInvScreenSize;
- [0014]
- [0015] in vec4 px_vPosition;
- [0016] in vec4 px_vTexCoord0;
- [0017] layout(location = 0) out vec4 px_vColor;
- [0018]
- [0019] void main()
- [0020] {
- [0021] vec4 px_vPosition = gl_FragCoord;
- [0022] bool px_bFrontFacing = gl_FrontFacing;
- [0023] int px_lPrimitiveID = gl_PrimitiveID;
- [0024]
- [0025]
- [0026] vec2 vScreenPos = px_vTexCoord0.xy;
- [0027]
- [0028]
- [0029] /////////////////
- [0030] // Rotated grid subsampling to avoid XY directional bias or Z precision bias while downsampling
- [0031] vec2 vOffset = vec2(fract((px_vPosition.xy + vec2(1.0)) / 2.0) * 2.0).yx * avInvScreenSize;
- [0032]
- [0033] //////////////////
- [0034] // Get new screen color
- [0035] px_vColor = texture(depthTexture, vScreenPos + vOffset).xxxx;
- [0036] }
- [0037]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_ssao_depth_downsample_frag.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] ////////////////////////////////////////////////////////
- [0006] // Deferred Depth unpack - Fragment Shader
- [0007] //
- [0008] // Unpacks the depth map of the gbuffer into the red channel.
- [0009] ////////////////////////////////////////////////////////
- [0010]
- [0011] //---------------------------------------------------------
- [0012]
- [0013] uniform float afFarPlane;
- [0014] uniform float afDepthDifference;
- [0015] uniform vec2 avDirection;
- [0016]
- [0017] layout(binding = 0) uniform sampler2D ssaoTexture;
- [0018]
- [0019] in vec4 px_vPosition;
- [0020] in vec4 px_vTexCoord0;
- [0021] layout(location = 0) out vec4 out_vColor;
- [0022]
- [0023] void main()
- [0024] {
- [0025] vec4 px_vPosition = gl_FragCoord;
- [0026] bool px_bFrontFacing = gl_FrontFacing;
- [0027] int px_lPrimitiveID = gl_PrimitiveID;
- [0028]
- [0029]
- [0030] //////////////////
- [0031] // Get core depth and AO
- [0032] vec2 vScreenPos = px_vTexCoord0.xy;
- [0033] vec4 vCoresample = texture(ssaoTexture, vScreenPos);
- [0034]
- [0035] float fCoreDepth = vCoresample.x * afFarPlane;
- [0036] float fDifference = (1.0 + fCoreDepth * 2.0 / 200.0) * afDepthDifference;
- [0037] float fDiffMul = 1.0 / fDifference;
- [0038]
- [0039] float fResult = vCoresample.y;
- [0040] float fWeight = 1;
- [0041]
- [0042] if(fCoreDepth < 64.0)
- [0043] {
- [0044] vec3 vSampleDepth;
- [0045] vec3 vSampleAO;
- [0046] vec3 vWeight;
- [0047] vec4 vSample;
- [0048]
- [0049] ///////////
- [0050] // Gather 4 samples in one direction
- [0051] vSample = texture(ssaoTexture, vScreenPos + avDirection * 1);
- [0052] vSampleDepth.x = vSample.x;
- [0053] vSampleAO.x = vSample.y;
- [0054] vSample = texture(ssaoTexture, vScreenPos + avDirection * 2);
- [0055] vSampleDepth.y = vSample.x;
- [0056] vSampleAO.y = vSample.y;
- [0057] vSample = texture(ssaoTexture, vScreenPos + avDirection * 3);
- [0058] vSampleDepth.z = vSample.x;
- [0059] vSampleAO.z = vSample.y;
- [0060]
- [0061] vSampleDepth = vSampleDepth * afFarPlane;
- [0062]
- [0063] ////////////
- [0064] // Combine them
- [0065] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
- [0066] fResult += dot(vWeight, vSampleAO);
- [0067] fWeight += dot(vWeight, vec3(1.0));
- [0068]
- [0069] ///////////////////
- [0070] // Gather 4 samples in the opposite
- [0071] vSample = texture(ssaoTexture, vScreenPos - avDirection * 1);
- [0072] vSampleDepth.x = vSample.x;
- [0073] vSampleAO.x = vSample.y;
- [0074] vSample = texture(ssaoTexture, vScreenPos - avDirection * 2);
- [0075] vSampleDepth.y = vSample.x;
- [0076] vSampleAO.y = vSample.y;
- [0077] vSample = texture(ssaoTexture, vScreenPos - avDirection * 3);
- [0078] vSampleDepth.z = vSample.x;
- [0079] vSampleAO.z = vSample.y;
- [0080]
- [0081] vSampleDepth = vSampleDepth * afFarPlane;
- [0082]
- [0083] ////////////
- [0084] // Combine them and normalize
- [0085] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
- [0086] fResult += dot(vWeight, vSampleAO);
- [0087] fWeight += dot(vWeight, vec3(1.0));
- [0088]
- [0089] fResult /= fWeight;
- [0090] }
- [0091]
- [0092] //////////
- [0093] // Store depth and AO
- [0094] vec4 vResult = vec4(vCoresample.x, fResult, 0, 0);
- [0095]
- [0096] //////////////////
- [0097] // Get new screen color
- [0098] out_vColor.xyzw = vResult;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_ssao_blur_frag.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] ////////////////////////////////////////////////////////
- [0006] // Deferred Depth unpack - Fragment Shader
- [0007] //
- [0008] // Unpacks the depth map of the gbuffer into the red channel.
- [0009] ////////////////////////////////////////////////////////
- [0010]
- [0011] //---------------------------------------------------------
- [0012]
- [0013] uniform float afFarPlane;
- [0014] uniform float afDepthDifference;
- [0015] uniform vec2 avDirection;
- [0016]
- [0017] layout(binding = 0) uniform sampler2D ssaoTexture;
- [0018]
- [0019] in vec4 px_vPosition;
- [0020] in vec4 px_vTexCoord0;
- [0021] layout(location = 0) out vec4 out_vColor;
- [0022]
- [0023] void main()
- [0024] {
- [0025] vec4 px_vPosition = gl_FragCoord;
- [0026] bool px_bFrontFacing = gl_FrontFacing;
- [0027] int px_lPrimitiveID = gl_PrimitiveID;
- [0028]
- [0029]
- [0030] //////////////////
- [0031] // Get core depth and AO
- [0032] vec2 vScreenPos = px_vTexCoord0.xy;
- [0033] vec4 vCoresample = texture(ssaoTexture, vScreenPos);
- [0034]
- [0035] float fCoreDepth = vCoresample.x * afFarPlane;
- [0036] float fDifference = (1.0 + fCoreDepth * 2.0 / 200.0) * afDepthDifference;
- [0037] float fDiffMul = 1.0 / fDifference;
- [0038]
- [0039] float fResult = vCoresample.y;
- [0040] float fWeight = 1;
- [0041]
- [0042] if(fCoreDepth < 64.0)
- [0043] {
- [0044] vec3 vSampleDepth;
- [0045] vec3 vSampleAO;
- [0046] vec3 vWeight;
- [0047] vec4 vSample;
- [0048]
- [0049] ///////////
- [0050] // Gather 4 samples in one direction
- [0051] vSample = texture(ssaoTexture, vScreenPos + avDirection * 1);
- [0052] vSampleDepth.x = vSample.x;
- [0053] vSampleAO.x = vSample.y;
- [0054] vSample = texture(ssaoTexture, vScreenPos + avDirection * 2);
- [0055] vSampleDepth.y = vSample.x;
- [0056] vSampleAO.y = vSample.y;
- [0057] vSample = texture(ssaoTexture, vScreenPos + avDirection * 3);
- [0058] vSampleDepth.z = vSample.x;
- [0059] vSampleAO.z = vSample.y;
- [0060]
- [0061] vSampleDepth = vSampleDepth * afFarPlane;
- [0062]
- [0063] ////////////
- [0064] // Combine them
- [0065] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
- [0066] fResult += dot(vWeight, vSampleAO);
- [0067] fWeight += dot(vWeight, vec3(1.0));
- [0068]
- [0069] ///////////////////
- [0070] // Gather 4 samples in the opposite
- [0071] vSample = texture(ssaoTexture, vScreenPos - avDirection * 1);
- [0072] vSampleDepth.x = vSample.x;
- [0073] vSampleAO.x = vSample.y;
- [0074] vSample = texture(ssaoTexture, vScreenPos - avDirection * 2);
- [0075] vSampleDepth.y = vSample.x;
- [0076] vSampleAO.y = vSample.y;
- [0077] vSample = texture(ssaoTexture, vScreenPos - avDirection * 3);
- [0078] vSampleDepth.z = vSample.x;
- [0079] vSampleAO.z = vSample.y;
- [0080]
- [0081] vSampleDepth = vSampleDepth * afFarPlane;
- [0082]
- [0083] ////////////
- [0084] // Combine them and normalize
- [0085] vWeight = vec3(0.93, 0.77, 0.56) * clamp(vec3(2.0) - abs(vec3(fCoreDepth) - vSampleDepth) * fDiffMul, vec3(0.0), vec3(1.0));
- [0086] fResult += dot(vWeight, vSampleAO);
- [0087] fWeight += dot(vWeight, vec3(1.0));
- [0088]
- [0089] fResult /= fWeight;
- [0090] }
- [0091]
- [0092] //////////
- [0093] // Store depth and AO
- [0094] vec4 vResult = vec4(vCoresample.x, fResult, 0, 0);
- [0095]
- [0096] //////////////////
- [0097] // Get new screen color
- [0098] out_vColor.xyzw = vResult;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_ssao_blur_frag.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] ////////////////////////////////////////////////////////
- [0006] // Deferred SSAO Upsample - Fragment Shader
- [0007] //
- [0008] // Applies SSAO to channel
- [0009] ////////////////////////////////////////////////////////
- [0010]
- [0011] //---------------------------------------------------------
- [0012]
- [0013] uniform float afFarPlane;
- [0014] uniform float afSizeDiv;
- [0015] uniform float afPower;
- [0016]
- [0017] layout(binding = 0) uniform sampler2D ssaoTexture;
- [0018] layout(binding = 1) uniform sampler2D depthTexture;
- [0019]
- [0020] in vec4 px_vPosition;
- [0021] in vec4 px_vTexCoord0;
- [0022] layout(location = 0) out vec4 out_vColor;
- [0023]
- [0024] void main()
- [0025] {
- [0026] vec4 px_vPosition = gl_FragCoord;
- [0027] bool px_bFrontFacing = gl_FrontFacing;
- [0028] int px_lPrimitiveID = gl_PrimitiveID;
- [0029]
- [0030]
- [0031] //////////////////
- [0032] // Get core depth and AO
- [0033] vec2 vScreenPos = px_vTexCoord0.xy;
- [0034]
- [0035]
- [0036] vec2 vAOPos = vScreenPos;
- [0037]
- [0038] vec4 vAO;
- [0039] vec4 vDepth;
- [0040] vec4 vSample;
- [0041]
- [0042] ////////
- [0043] // sample 4 neightbur pixels
- [0044] vSample = texture(ssaoTexture, vAOPos);
- [0045] vAO.x = vSample.y;
- [0046] vDepth.x = vSample.x;
- [0047]
- [0048] vSample = textureOffset(ssaoTexture, vAOPos, ivec2(0, 1));
- [0049] vAO.y = vSample.y;
- [0050] vDepth.y = vSample.x;
- [0051]
- [0052] vSample = textureOffset(ssaoTexture, vAOPos, ivec2(1, 0));
- [0053] vAO.z = vSample.y;
- [0054] vDepth.z = vSample.x;
- [0055]
- [0056] vSample = textureOffset(ssaoTexture, vAOPos, ivec2(1, 1));
- [0057] vAO.w = vSample.y;
- [0058] vDepth.w = vSample.x;
- [0059]
- [0060] float fCoreDepth = texture(depthTexture, vScreenPos).x;
- [0061]
- [0062] /////////
- [0063] // Calculate upscale weight
- [0064] vec4 vWeight;
- [0065]
- [0066] ////////
- [0067] // Weight from bilinear filter
- [0068] vec2 vBilinearWeight = fract((vec2(1.0) + px_vPosition.xy) * afSizeDiv);
- [0069] vWeight.w = vBilinearWeight.x * vBilinearWeight.y;
- [0070] vWeight.z = vBilinearWeight.x * (1.0 - vBilinearWeight.y);
- [0071] vWeight.y = (1.0 - vBilinearWeight.x) * vBilinearWeight.y;
- [0072] vWeight.x = (1.0 - vBilinearWeight.x) * (1.0 - vBilinearWeight.y);
- [0073]
- [0074] //////////
- [0075] // Weight from depth, pick the pixel with the closest depth to the fullsize depth
- [0076] vec4 vDepthWeight = max(vec4(0.05), 0.1 - abs((vDepth - vec4(fCoreDepth)) * afFarPlane)) * 5.0;
- [0077] vWeight = vWeight * vDepthWeight;
- [0078]
- [0079] /////////
- [0080] // Calucalte AO based on weighted depth
- [0081] float fCoreAO = dot(vWeight, vAO) / dot(vec4(1.0), vWeight);
- [0082]
- [0083]
- [0084] /////////
- [0085] // Pack depth
- [0086] vec4 vResult = vec4(pow(fCoreAO, afPower / 2.2));
- [0087]
- [0088] //////////////////
- [0089] // Get new screen color
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_ssao_upsample_frag.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] ////////////////////////////////////////////////////////
- [0006] // SSAO Temporal - Fragment Shader
- [0007] //
- [0008] // Blend cureent and previous frame together
- [0009] ////////////////////////////////////////////////////////
- [0010]
- [0011] //---------------------------------------------------------
- [0012]
- [0013] uniform float afFarPlane;
- [0014] uniform float afSizeDiv;
- [0015] uniform float afPower;
- [0016]
- [0017] uniform vec2 avScreenSize;
- [0018] uniform mat4 a_mtxTemporalProjection;
- [0019] uniform vec3 avUVToView0;
- [0020] uniform vec3 avUVToView1;
- [0021] uniform mat4 a_mtxTemporalView;
- [0022]
- [0023] uniform float afTemporalBlurAmount;
- [0024]
- [0025]
- [0026] layout(binding = 0) uniform sampler2D ssaoTexture;
- [0027] layout(binding = 1) uniform sampler2D temporalTexture;
- [0028]
- [0029] in vec4 px_vPosition;
- [0030] in vec4 px_vTexCoord0;
- [0031] layout(location = 0) out vec4 out_vColor;
- [0032]
- [0033] void main()
- [0034] {
- [0035] vec4 px_vPosition = gl_FragCoord;
- [0036] bool px_bFrontFacing = gl_FrontFacing;
- [0037] int px_lPrimitiveID = gl_PrimitiveID;
- [0038]
- [0039]
- [0040] //////////////////
- [0041] // Get core depth and AO
- [0042] vec2 vScreenPos = px_vTexCoord0.xy;
- [0043] vec4 vResult = texture(ssaoTexture, vScreenPos.xy);
- [0044] float fCoreDepth = vResult.x;
- [0045]
- [0046] if(fCoreDepth * afFarPlane < 64.0)
- [0047] {
- [0048] /////////////////////////
- [0049] // Convert the current view position to the view position it would represent the last frame and get the screen coords
- [0050] vec3 vPos = vScreenPos.xyy * avUVToView0 + avUVToView1;
- [0051] vPos = vPos * fCoreDepth;
- [0052] vPos = ((a_mtxTemporalView) * (vec4(vPos, 1.0))).xyz;
- [0053]
- [0054] vec4 vTemporalCoords = ((a_mtxTemporalProjection) * (vec4(vPos, 1.0)));
- [0055] vTemporalCoords /= vTemporalCoords.w;
- [0056] vTemporalCoords.xy = (vTemporalCoords.xy * vec2(0.5, 0.5) + vec2(0.5, 0.5));
- [0057]
- [0058] //////////////
- [0059] // Get the AO from the last frame
- [0060] vec4 vLastFrameAO = texture(temporalTexture, vTemporalCoords.xy);
- [0061] vec4 vLinearFrameAO = texture(temporalTexture, vScreenPos.xy);
- [0062]
- [0063] vec3 vTemporalPos = vTemporalCoords.xyy * avUVToView0 + avUVToView1;
- [0064] vTemporalPos = vTemporalPos * vLastFrameAO.x;
- [0065]
- [0066] if(isnan(vLastFrameAO.y)) vLastFrameAO.y = vResult.y;
- [0067] if(isnan(vLinearFrameAO.y)) vLinearFrameAO.y = vResult.y;
- [0068]
- [0069] ///////////
- [0070] // Check for linear projected AO, that is AO from an object that has been moving along with the camera
- [0071] float fLinearWeight = abs(fCoreDepth - vLinearFrameAO.x) * afFarPlane;
- [0072] vLastFrameAO.y = mix(vLinearFrameAO.y, vLastFrameAO.y, min(1.0, (fLinearWeight + 2.0 / 60.0) + max(0, (fCoreDepth * afFarPlane-0.4)*2)));
- [0073]
- [0074] ///////
- [0075] // Get weight based on distance to last frame position
- [0076] float fWeight = distance(vTemporalPos, vPos) * 9;
- [0077] fWeight += abs(vLastFrameAO.y - vResult.y) * 3.5;
- [0078] /*
- [0079] /////////////
- [0080] // Fade slower closer to the edge of the screen
- [0081] vec2 vDist = 1.0 / (1.0 - abs(0.9 - vScreenPos * 1.8));
- [0082] float fScreenFalloff = min(1.0, (1.0 / (vDist.x + vDist.y)));
- [0083] fWeight *= fScreenFalloff;
- [0084] */
- [0085] ////////////////
- [0086] // Clamp to make sure atleast 1 / 60th of a frame is blended
- [0087] fWeight = clamp(fWeight, afTemporalBlurAmount, 1.0);
- [0088]
- [0089] vResult.y = mix(vLastFrameAO.y, vResult.y, fWeight);
- [0090] }
- [0091]
- [0092] //////////////////
- [0093] // Get new screen color
- [0094] out_vColor.xyzw = vec4(vResult.xy, 0, 0);
- [0095] }
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_ssao_temporal_frag.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] #extension GL_ARB_draw_instanced : enable
- [0006] /////////////////////////////
- [0007] // Quad vertex shader used by deferred poost effects
- [0008] //////////////////////////
- [0009]
- [0010] in vec4 vtx_vPosition;
- [0011] in vec4 vtx_vTexCoord0;
- [0012] in vec4 vtx_vTexCoord1;
- [0013] out vec4 px_vTexCoord0;
- [0014]
- [0015] void main()
- [0016] {
- [0017] int vtx_lVertexID = gl_VertexID;
- [0018] int vtx_lInstanceID = gl_InstanceID;
- [0019]
- [0020] vec4 px_vPosition = vec4(0);
- [0021]
- [0022]
- [0023] px_vPosition = vtx_vPosition * vec4(2.0,-2.0, 0.0, 0.0) + vec4(-1.0, 1.0, 0.0, 1.0);
- [0024] px_vTexCoord0 = vtx_vTexCoord0;
- [0025]
- [0026]
- [0027] gl_Position = px_vPosition;
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_posteffect_quad_vtx.hpsl'
- ERROR: Failed to compile GLSL shader ''!
- Shader code:
- -------------------
- [0001] #version 330
- [0002] #extension GL_ARB_explicit_attrib_location : enable
- [0003] #extension GL_ARB_uniform_buffer_object : enable
- [0004] #extension GL_ARB_shading_language_420pack: enable
- [0005] uniform vec3 avUVToView0;
- [0006] uniform vec3 avUVToView1;
- [0007]
- [0008] uniform float afT;
- [0009] uniform float afStepSizeMax;
- [0010] uniform float afFarPlane;
- [0011]
- [0012] uniform float afRadius;
- [0013] uniform float afScreenSizeDiv;
- [0014] uniform float afLodScale;
- [0015]
- [0016] layout(binding = 0) uniform sampler2D depthNMap;
- [0017] layout(binding = 1) uniform sampler2D depthMipMap;
- [0018]
- [0019] //---------------------------------------------
- [0020]
- [0021] vec3 GetViewPosition(in vec2 avUV, in float afLod)
- [0022] {
- [0023] float fLinearDepth = textureLod(depthMipMap, avUV, afLod).r;
- [0024]
- [0025] //////////////////
- [0026] // Transform uv coords to near plane direction and then move in that direction for the length LinearDepth
- [0027] vec3 vDirection = avUV.xyy * avUVToView0 + avUVToView1;
- [0028] return vDirection * fLinearDepth;
- [0029] }
- [0030]
- [0031] //--------------------------------------------
- [0032]
- [0033] in vec4 px_vPosition;
- [0034] in vec4 px_vTexCoord0;
- [0035] layout(location = 0) out vec4 out_vColor;
- [0036]
- [0037] void main()
- [0038] {
- [0039] vec4 px_vPosition = gl_FragCoord;
- [0040] bool px_bFrontFacing = gl_FrontFacing;
- [0041] int px_lPrimitiveID = gl_PrimitiveID;
- [0042]
- [0043]
- [0044] const float fPi = 3.14159265;
- [0045] const float fDirectionStep = fPi / ((1.0 + sqrt(5.0)) / 2.0);
- [0046]
- [0047] float fNegInvRadius = -1.0 / (afRadius);
- [0048] float fAO = 0.0;
- [0049] float fTotalWeight = 0.0;
- [0050]
- [0051] ///////////////
- [0052] // Get the depth to compute AO for
- [0053]
- [0054] vec4 vCore0 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(0,0));
- [0055] vec4 vCore1 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(1,0));
- [0056] vec4 vCore2 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(0,1));
- [0057] vec4 vCore3 = textureOffset(depthNMap, px_vTexCoord0.xy, ivec2(1,1));
- [0058] vec4 vCore;
- [0059]
- [0060]
- [0061] vec4 vDepth;
- [0062] vDepth.x = vCore0.w;
- [0063] vDepth.y = vCore1.w;
- [0064] vDepth.z = vCore2.w;
- [0065] vDepth.w = vCore3.w;
- [0066]
- [0067] vCore.w = max(vCore0.w,
- [0068] max(vCore1.w,
- [0069] max(vCore2.w,
- [0070] vCore3.w)));
- [0071]
- [0072] vDepth = 1.0 / (abs(vDepth - vec4(vCore.w)) + 0.00000001);
- [0073]
- [0074] vCore.xyz = normalize(vCore0.xyz * vDepth.x + vCore1.xyz * vDepth.y + vCore2.xyz * vDepth.z + vCore3.xyz * vDepth.w);
- [0075] vec2 vUVOffset = vCore0.xy;
- [0076]
- [0077]
- [0078] float fLinearDepth = vCore.w;
- [0079] vec3 vDirection = px_vTexCoord0.xyy * avUVToView0 + avUVToView1;
- [0080] vec3 vPos = vDirection * fLinearDepth;
- [0081] vec3 vNormal;
- [0082] vNormal.xyz = vCore.xyz;
- [0083]
- [0084] ///////////////
- [0085] // Get random rotation
- [0086] float fRand = fract(sin(dot(px_vPosition.xy,vec2(12.9898,78.233))) * 437.5453);
- [0087] float fRandRot = fRand * 2.0 * fPi + afT * 0.5;
- [0088] vec2 vUV0 = vec2(cos(fRandRot), sin(fRandRot));
- [0089] vec2 vRand = vec2(cos(fDirectionStep), sin(fDirectionStep));
- [0090] mat2 mtxRot = mat2(vRand.x,-vRand.y,vRand.y,vRand.x);
- [0091]
- [0092] ////////////
- [0093] // Move the position away from the normal a little bit
- [0094] float fFade = clamp(2.0 - fLinearDepth * afFarPlane / 32.0, 0.0, 1.0);
- [0095]
- [0096] float fNormalOffset = max(0.0, fLinearDepth * afFarPlane - 16.0) * 0.025;
- [0097] vPos += vNormal * (0.03 + (1.0 - vNormal.z) * fNormalOffset);
- [0098]
- [0099] float fStepSize = abs(afStepSizeMax * afRadius / vPos.z);
- [0100] float fStepSizePart = (0.5 * fStepSize / ((2 + (16) * (16))));
- [0101] vec2 vUV = px_vTexCoord0.xy + vUVOffset.xy * fStepSize * 0.25;
- [0102]
- [0103] if(fFade <= 0.0)
- [0104] {
- [0105] fAO = 1.0;
- [0106] }
- [0107] else
- [0108] {
- [0109] vec3 vAO = vec3(0.0);
- [0110]
- [0111] for(float d = 0.0; d < 16; d+=4.0)
- [0112] {
- [0113] //////////////
- [0114] // Get two random direction to sample in
- [0115] vec4 vOffset = (d + vec4(2, 3, 4, 5));
- [0116] vOffset *= vOffset * fStepSizePart;
- [0117]
- [0118] vec2 vUV1 = ((mtxRot) * (vUV0));
- [0119] vUV0 = ((mtxRot) * (vUV1));
- [0120]
- [0121] vec4 vLod = log2(vOffset * afLodScale+1.0);
- [0122]
- [0123] vec3 vDelta0 = GetViewPosition(vUV + vUV1 * vOffset.x, vLod.x) - vPos;
- [0124] vec3 vDelta1 = GetViewPosition(vUV - vUV1 * vOffset.y, vLod.y) - vPos;
- [0125] vec3 vDelta2 = GetViewPosition(vUV + vUV0 * vOffset.z, vLod.z) - vPos;
- [0126] vec3 vDelta3 = GetViewPosition(vUV - vUV0 * vOffset.w, vLod.w) - vPos;
- [0127]
- [0128] vec4 vDistanceSqr = vec4(dot(vDelta0, vDelta0),
- [0129] dot(vDelta1, vDelta1),
- [0130] dot(vDelta2, vDelta2),
- [0131] dot(vDelta3, vDelta3));
- [0132]
- [0133] vec4 vInvertedLength = inversesqrt(vDistanceSqr);
- [0134]
- [0135] vec4 vFalloff = vec4(1.0) + vDistanceSqr * vInvertedLength * fNegInvRadius;
- [0136]
- [0137] ////////////////////
- [0138] // Get AO for xyz direction based on distance from sample and sum
- [0139] vec4 vSampleAO = max(vec4(0.0), vFalloff) * vInvertedLength;
- [0140]
- [0141] vDelta0 *= vSampleAO.x;
- [0142] vDelta1 *= vSampleAO.y;
- [0143] vDelta2 *= vSampleAO.z;
- [0144] vDelta3 *= vSampleAO.w;
- [0145]
- [0146] vAO.xyz += vDelta0 + vDelta1 + vDelta2 + vDelta3;
- [0147]
- [0148] }
- [0149] fAO = 1.0 - max(0.0, dot(vNormal, vAO * 0.1988 * (4.0 / (16))));
- [0150]
- [0151] fAO = mix(1.0, fAO, fFade);
- [0152] }
- [0153]
- ---------------------
- Compile log:
- ---------------------
- 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
- ---------------------
- ERROR: Couldn't create program 'deferred_ssao_render_frag.hpsl'
Advertisement
Add Comment
Please, Sign In to add comment