aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFloorFragmentShader.fsh2
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFragmentShader.fsh4
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESGaussianBlur/CompShader_ES3.csh6
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_AO.pvrbin2097219 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_MetalSmooth_converted_metalRoughness.pvrbin2097219 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_emissive.pvrbin2796355 -> 2796355 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_occlusionRoughnessMetallic.pvrbin0 -> 2097219 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/DiffuseIrradianceMap.pvrbin131116 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceFragShader.fsh59
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceVertShader.vsh16
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Lightmap.pvrbin33554491 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/MonValley.pvrbin4194883 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRFragShader.fsh164
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRVertShader.vsh112
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PreFilterFragShader.fsh134
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterEnvMap.pvrbin2097076 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterL0MipMap.pvrbin2097076 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/SkyboxFragShader.fsh41
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/damagedHelmet.gltf11
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5.pvr (renamed from targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/MonValley_baked_lightmap.pvr)bin33554491 -> 33554491 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Irradiance.pvrbin0 -> 131131 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Prefiltered.pvrbin0 -> 2095171 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5.pvrbin0 -> 33554491 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Irradiance.pvrbin0 -> 131131 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Prefiltered.pvrbin0 -> 8388547 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/FragShader.fsh28
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/VertShader.vsh3
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36.pvrbin0 -> 353613 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36_rgb.pvrbin703139 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60.pvrbin0 -> 44138 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60_rgb.pvrbin175211 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36.pvrbin0 -> 22684 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36_rgb.pvrbin88219 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46.pvrbin0 -> 44530 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46_rgb.pvrbin175603 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56.pvrbin0 -> 44530 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56_rgb.pvrbin131912 -> 0 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation2D/font.pvrbin2798974 -> 2798974 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation3D/font.pvrbin1400867 -> 1400872 bytes
-rw-r--r--targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESParticleSystem/ParticleSolver.csh4
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESDeferredShadingbin2294392 -> 2094312 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESGaussianBlurbin2084496 -> 1635472 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESImageBasedLightingbin2514024 -> 2021088 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRCamerabin1959080 -> 1565000 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRUtilsbin2208296 -> 2017504 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingUIRendererbin2071680 -> 1634936 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation2Dbin2535768 -> 2093000 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation3Dbin2522504 -> 2015416 bytes
-rwxr-xr-xtargetfs/arm64/Examples/Advanced/Wayland/OpenGLESParticleSystembin2116920 -> 2012528 bytes
49 files changed, 176 insertions, 408 deletions
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFloorFragmentShader.fsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFloorFragmentShader.fsh
index 8636864..e145041 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFloorFragmentShader.fsh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFloorFragmentShader.fsh
@@ -40,7 +40,7 @@ void main()
40 pls.depth = depth; 40 pls.depth = depth;
41 41
42#ifndef GL_EXT_shader_pixel_local_storage2 42#ifndef GL_EXT_shader_pixel_local_storage2
43 // clear pixel local storage color when GL_EXT_shader_pixel_local_storage2 isn't supported 43 // clear pixel local storage colour when GL_EXT_shader_pixel_local_storage2 isn't supported
44 pls.color = vec3(0.0); 44 pls.color = vec3(0.0);
45#endif 45#endif
46} \ No newline at end of file 46} \ No newline at end of file
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFragmentShader.fsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFragmentShader.fsh
index 0a56d38..f8ad2dd 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFragmentShader.fsh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESDeferredShading/GBufferFragmentShader.fsh
@@ -35,7 +35,7 @@ void main()
35 // Pack the specular exponent with the albedo 35 // Pack the specular exponent with the albedo
36 pls.albedo = vec4(texture(sTexture, vTexCoord).rgb * vDiffuseColor.rgb, fSpecularStrength); 36 pls.albedo = vec4(texture(sTexture, vTexCoord).rgb * vDiffuseColor.rgb, fSpecularStrength);
37 37
38 // Calculate viewspace perturbed normal 38 // Calculate view space perturbed normal
39 mediump vec3 bumpmap = normalize(texture(sBumpMap, vTexCoord).rgb * 2.0 - 1.0); 39 mediump vec3 bumpmap = normalize(texture(sBumpMap, vTexCoord).rgb * 2.0 - 1.0);
40 highp mat3 tangentSpace = mat3(normalize(vTangent), normalize(vBinormal), normalize(vNormal)); 40 highp mat3 tangentSpace = mat3(normalize(vTangent), normalize(vBinormal), normalize(vNormal));
41 mediump vec3 normalVS = tangentSpace * bumpmap; 41 mediump vec3 normalVS = tangentSpace * bumpmap;
@@ -46,7 +46,7 @@ void main()
46 pls.depth = vViewPosition.z / fFarClipDistance; 46 pls.depth = vViewPosition.z / fFarClipDistance;
47 47
48#ifndef GL_EXT_shader_pixel_local_storage2 48#ifndef GL_EXT_shader_pixel_local_storage2
49 // clear pixel local storage color when GL_EXT_shader_pixel_local_storage2 isn't supported 49 // clear pixel local storage colour when GL_EXT_shader_pixel_local_storage2 isn't supported
50 pls.color = vec3(0.0); 50 pls.color = vec3(0.0);
51#endif 51#endif
52} \ No newline at end of file 52} \ No newline at end of file
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESGaussianBlur/CompShader_ES3.csh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESGaussianBlur/CompShader_ES3.csh
index 4dbb14c..27c6826 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESGaussianBlur/CompShader_ES3.csh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESGaussianBlur/CompShader_ES3.csh
@@ -29,9 +29,9 @@ void main()
29 ivec2 image_bounds = ivec2(imageSize(imageIn)); 29 ivec2 image_bounds = ivec2(imageSize(imageIn));
30 30
31 int fptr = 0; // Counter tracking the last item in our cache 31 int fptr = 0; // Counter tracking the last item in our cache
32 int x = 0; // Counter (Calculated from fpts) used to find which item in the weights array each color in the cache corresponds to 32 int x = 0; // Counter (Calculated from fpts) used to find which item in the weights array each colour in the cache corresponds to
33 33
34 mediump vec3 f[GaussianKernelSize]; // This is our per-row cache of colors. We use the previous numbers to check what we must load or discard. 34 mediump vec3 f[GaussianKernelSize]; // This is our per-row cache of colours. We use the previous numbers to check what we must load or discard.
35 35
36 int row = int(gl_GlobalInvocationID.x); 36 int row = int(gl_GlobalInvocationID.x);
37 37
@@ -58,7 +58,7 @@ void main()
58 // Scan the image left-to-right (one invocation must be launched for each row of the image) 58 // Scan the image left-to-right (one invocation must be launched for each row of the image)
59 for (int column = 0; column < image_bounds.x; ++column) 59 for (int column = 0; column < image_bounds.x; ++column)
60 { 60 {
61 // Average the color. X tracks the which item in the weight array corresponds to each item in the color array 61 // Average the colour. X tracks the which item in the weight array corresponds to each item in the color array
62 // IMPORTANT NOTE: We do not need bounds checking or expensive modulo operations here, because we have made sure 62 // IMPORTANT NOTE: We do not need bounds checking or expensive modulo operations here, because we have made sure
63 // the weight array is doubled. 63 // the weight array is doubled.
64 mediump vec3 col = f[0] * Weights[x]; 64 mediump vec3 col = f[0] * Weights[x];
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_AO.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_AO.pvr
deleted file mode 100644
index b3b3132..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_AO.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_MetalSmooth_converted_metalRoughness.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_MetalSmooth_converted_metalRoughness.pvr
deleted file mode 100644
index 58c2ec3..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_MetalSmooth_converted_metalRoughness.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_emissive.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_emissive.pvr
index fa45726..300c84d 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_emissive.pvr
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_emissive.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_occlusionRoughnessMetallic.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_occlusionRoughnessMetallic.pvr
new file mode 100644
index 0000000..30530da
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Default_occlusionRoughnessMetallic.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/DiffuseIrradianceMap.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/DiffuseIrradianceMap.pvr
deleted file mode 100644
index 7d27f02..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/DiffuseIrradianceMap.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceFragShader.fsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceFragShader.fsh
deleted file mode 100644
index 450ebc1..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceFragShader.fsh
+++ /dev/null
@@ -1,59 +0,0 @@
1#version 310 es
2
3#define PI 3.1415926535897932384626433832795
4
5layout(binding = 0) uniform samplerCube envMap;
6layout(location = 0) in mediump vec3 inPos;
7layout(location = 0) out mediump vec4 outColor;
8
9const mediump float DELTA_THETA = 1./100.f;
10const mediump float DELTA_PHI = 1./100.f;
11
12mediump float M(mediump vec3 N, mediump vec3 dir)
13{
14 return max(dot(N, dir), 0.0);
15}
16
17//http://graphicrants.blogspot.com/2009/04/rgbm-color-encoding.html
18mediump vec4 RGBMEncode(highp vec3 color)
19{
20 highp vec4 rgbm;
21 color *= 1.0 / 6.0;
22 rgbm.a = clamp( max( max( color.r, color.g ), max( color.b, 1e-6 ) ), 0.0, 1.0);
23 rgbm.a = ceil(rgbm.a * 255.0) / 255.0;
24 rgbm.rgb = color / rgbm.a;
25 return rgbm;
26}
27
28void main()
29{
30 mediump vec3 norm = normalize(inPos);
31 const mediump float twoPI = PI * 2.0;
32 const mediump float halfPI = PI * 0.5;
33
34 highp float numSamples = 0.;
35 highp vec3 out_col_tmp = vec3(0.);
36 const highp float HDR_SCALER = 100.0;
37
38 for(mediump float theta = 0.0; theta < twoPI; theta += DELTA_THETA)
39 {
40 for(mediump float phi = 0.; phi < twoPI; phi += DELTA_PHI)
41 {
42 mediump float cosTheta = cos(theta);
43 mediump float sinPhi = sin(phi);
44 mediump float sinTheta = sin(theta);
45 mediump float cosPhi = cos(phi);
46 mediump vec3 dir = normalize(vec3(sinTheta * cosPhi, sinPhi, cosPhi * cosTheta));
47 highp vec4 tmpEnv = texture(envMap, dir);
48 highp float tmpLight = tmpEnv.a;
49
50 tmpLight = HDR_SCALER * tmpLight * tmpLight + 1.0;
51 tmpEnv.rgb *= tmpLight;
52
53 out_col_tmp += tmpEnv.rgb * M(norm, dir);
54 numSamples += 1.;
55 }
56 }
57 outColor = RGBMEncode(out_col_tmp * PI / numSamples);
58}
59
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceVertShader.vsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceVertShader.vsh
deleted file mode 100644
index 8d30356..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/IrradianceVertShader.vsh
+++ /dev/null
@@ -1,16 +0,0 @@
1#version 310 es
2
3layout(location = 0) in highp vec3 inVertex;
4
5layout(location = 0) uniform highp mat4 rotate;
6
7layout(location = 0) out mediump vec3 outUVW;
8
9void main()
10{
11 // Set position
12 outUVW = (mat3(rotate) * inVertex);
13
14 // Calculate ray direction
15 gl_Position = vec4(inVertex, 1.0);
16}
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Lightmap.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Lightmap.pvr
deleted file mode 100644
index 17b0548..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/Lightmap.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/MonValley.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/MonValley.pvr
deleted file mode 100644
index f357ddc..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/MonValley.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRFragShader.fsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRFragShader.fsh
index 93b8a7b..a017533 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRFragShader.fsh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRFragShader.fsh
@@ -1,19 +1,15 @@
1#version 310 es 1#version 310 es
2 2
3#define PI 3.1415926535897932384626433832795 3#define PI 3.1415926535897932384626433832795
4const highp float ONE_OVER_PI = 1.0 / PI; 4#define ONE_OVER_PI (1.0 / 3.1415926535897932384626433832795)
5const mediump float ONE_OVER_EIGHT = 1.0 / 8.0;
6const highp float ExposureBias = 4.0;
7
8const highp vec3 lightColor = vec3(1.0);
9 5
10layout(location = 0) in highp vec3 inWorldPos; 6layout(location = 0) in highp vec3 inWorldPos;
11layout(location = 1) in mediump vec3 inNormal; 7layout(location = 1) in mediump vec3 inNormal;
12layout(location = 2) in mediump vec2 inTexCoord; 8layout(location = 2) flat in mediump int inInstanceIndex;
13layout(location = 3) in mediump vec2 inMetallicRoughness;// r: metallic, g: roughness 9
14layout(location = 4) in mediump vec3 rgb; 10layout(location = 3) in mediump vec2 inTexCoord;
15layout(location = 5) in mediump vec3 inTangent; 11layout(location = 4) in mediump vec3 inTangent;
16layout(location = 6) in mediump vec3 inBitTangent; 12layout(location = 5) in mediump vec3 inBitTangent;
17 13
18#ifdef MATERIAL_TEXTURES 14#ifdef MATERIAL_TEXTURES
19layout(binding = 0) uniform mediump sampler2D albedoMap; 15layout(binding = 0) uniform mediump sampler2D albedoMap;
@@ -22,39 +18,56 @@ layout(binding = 2) uniform mediump sampler2D normalMap;
22layout(binding = 3) uniform mediump sampler2D emissiveMap; 18layout(binding = 3) uniform mediump sampler2D emissiveMap;
23#endif 19#endif
24 20
25layout(binding = 4) uniform mediump samplerCube irradianceMap; 21layout(binding = 5) uniform mediump samplerCube irradianceMap;
26layout(binding = 5) uniform mediump samplerCube prefilteredMap; 22layout(binding = 6) uniform mediump samplerCube prefilteredMap;
27layout(binding = 6) uniform mediump sampler2D brdfLUTmap; 23layout(binding = 7) uniform mediump sampler2D brdfLUTmap;
28layout(binding = 7) uniform mediump samplerCube prefilteredMipMap; 24layout(binding = 8) uniform mediump samplerCube environmentMap;
29 25
30layout(location = 0) out mediump vec4 outColor; 26layout(location = 0) out mediump vec4 outColor;
31 27
32layout(std140, binding = 0) uniform UboStatic 28layout(std140, binding = 0) uniform UboStatic
33{ 29{
34 highp vec3 lightDir; 30 mediump vec3 lightDir;
31 mediump vec3 lightColor;
35 uint numPrefilteredMipLevels; 32 uint numPrefilteredMipLevels;
36} uboStatic; 33} uboStatic;
37 34
38layout(std140, binding = 1) uniform UboDynamic 35layout(std140, binding = 1) uniform UboDynamic
39{ 36{
40 highp vec3 camPos;
41 highp mat4 VPMatrix; 37 highp mat4 VPMatrix;
38 highp vec3 camPos;
39 mediump float emissiveIntensity;
40 mediump float exposure;
42} uboDynamic; 41} uboDynamic;
43 42
44layout(std140, binding = 2) uniform UboPerModel 43struct Material
45{ 44{
46 highp mat4 ModelMatrix; 45 mediump vec3 albedo;
47 mediump float emissiveScale; 46 mediump float roughness;
48} uboPerModel; 47 mediump float metallic;
48};
49
50layout(std140, binding = 3) uniform Materials
51{
52 Material mat[25];
53} materials;
54
55#define MEDIUMP_FLT_MAX 65504.0
56
57#define saturateMediump(x) min(x, MEDIUMP_FLT_MAX)
49 58
50// Normal Distribution function 59// Normal Distribution function
51// http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf 60// http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf
52mediump float d_GGX(mediump float dotNH, mediump float roughness) 61// Mediump optimised GGX implementation https://gist.github.com/romainguy/a2e9208f14cae37c579448be99f78f25
62mediump float d_GGX(mediump float NdotH, mediump float roughness, mediump vec3 h, mediump vec3 n)
53{ 63{
54 mediump float alpha = roughness * roughness; 64 mediump vec3 NxH = cross(n, h);
55 mediump float alpha2 = alpha * alpha; 65 mediump float oneMinusNoHSquared = dot(NxH, NxH);
56 mediump float x = dotNH * dotNH * (alpha2 - 1.0) + 1.0; 66
57 return alpha2 / (PI * x * x); 67 mediump float a = NdotH * roughness;
68 mediump float k = roughness / (oneMinusNoHSquared + a * a);
69 mediump float d = k * k * ONE_OVER_PI;
70 return saturateMediump(d);
58} 71}
59 72
60mediump float g1(mediump float dotAB, mediump float k) 73mediump float g1(mediump float dotAB, mediump float k)
@@ -67,7 +80,7 @@ mediump float g1(mediump float dotAB, mediump float k)
67mediump float g_schlicksmithGGX(mediump float dotNL, mediump float dotNV, mediump float roughness) 80mediump float g_schlicksmithGGX(mediump float dotNL, mediump float dotNV, mediump float roughness)
68{ 81{
69 mediump float k = (roughness + 1.0); 82 mediump float k = (roughness + 1.0);
70 k = (k * k) * ONE_OVER_EIGHT; 83 k = (k * k) / 8.0;
71 return g1(dotNL, k) * g1(dotNV, k); 84 return g1(dotNL, k) * g1(dotNV, k);
72} 85}
73 86
@@ -93,7 +106,7 @@ mediump vec3 computeLight(mediump vec3 V, mediump vec3 N, mediump vec3 F0, mediu
93 mediump vec3 H = normalize (V + L); 106 mediump vec3 H = normalize (V + L);
94 107
95 mediump float dotNL = clamp(dot(N, L), 0.0, 1.0); 108 mediump float dotNL = clamp(dot(N, L), 0.0, 1.0);
96 highp vec3 color = vec3(0.0); 109 mediump vec3 color = vec3(0.0);
97 110
98 // light contributed only if the angle between the normal and light direction is less than equal to 90 degree. 111 // light contributed only if the angle between the normal and light direction is less than equal to 90 degree.
99 if(dotNL > 0.0) 112 if(dotNL > 0.0)
@@ -104,7 +117,7 @@ mediump vec3 computeLight(mediump vec3 V, mediump vec3 N, mediump vec3 F0, mediu
104 117
105 ///-------- Specular BRDF: COOK-TORRANCE --------- 118 ///-------- Specular BRDF: COOK-TORRANCE ---------
106 // D = Microfacet Normal distribution. 119 // D = Microfacet Normal distribution.
107 mediump float D = d_GGX(dotNH, roughness); 120 mediump float D = d_GGX(dotNH, roughness, H, N);
108 121
109 // G = Geometric Occlusion 122 // G = Geometric Occlusion
110 mediump float G = g_schlicksmithGGX(dotNL, dotNV, roughness); 123 mediump float G = g_schlicksmithGGX(dotNL, dotNV, roughness);
@@ -120,26 +133,28 @@ mediump vec3 computeLight(mediump vec3 V, mediump vec3 N, mediump vec3 F0, mediu
120 mediump vec3 kD = (vec3(1.0) - F) * (1.0 - metallic); 133 mediump vec3 kD = (vec3(1.0) - F) * (1.0 - metallic);
121 mediump vec3 diff = kD * albedo * ONE_OVER_PI; 134 mediump vec3 diff = kD * albedo * ONE_OVER_PI;
122 ///-------- DIFFUSE + SPEC ------ 135 ///-------- DIFFUSE + SPEC ------
123 color += (diff + spec) * lightColor * dotNL;// scale the final color based on the angle between the light and the surface normal. 136 color += (diff + spec) * uboStatic.lightColor * dotNL; // scale the final colour based on the angle between the light and the surface normal.
124 } 137 }
125 return color; 138 return color;
126} 139}
127 140
128mediump vec3 RGBMDecode(mediump vec4 rgbm)
129{
130 return 6.0 * rgbm.rgb * rgbm.a;
131}
132
133mediump vec3 prefilteredReflection(mediump float roughness, mediump vec3 R) 141mediump vec3 prefilteredReflection(mediump float roughness, mediump vec3 R)
134{ 142{
135 mediump float lod = roughness * float(uboStatic.numPrefilteredMipLevels - 1u); 143 // We need to detect where we need to sample from.
136 if(lod < 1.) 144 mediump float maxmip = float(uboStatic.numPrefilteredMipLevels - 1u);
145
146 mediump float cutoff = 1. / maxmip;
147
148
149 if(roughness <= cutoff)
137 { 150 {
138 return mix(RGBMDecode(texture(prefilteredMipMap, R)), RGBMDecode(textureLod(prefilteredMap, R, lod)), lod); 151 mediump float lod = roughness * maxmip;
152 return mix(texture(environmentMap, R).rgb, textureLod(prefilteredMap, R, 0.).rgb, lod);
139 } 153 }
140 else 154 else
141 { 155 {
142 return RGBMDecode(textureLod(prefilteredMap, R, lod)); 156 mediump float lod = (roughness - cutoff) * maxmip / (1. - cutoff); // Remap to 0..1 on rest of mip maps
157 return textureLod(prefilteredMap, R, lod).rgb;
143 } 158 }
144} 159}
145 160
@@ -148,12 +163,13 @@ mediump vec3 computeEnvironmentLighting(mediump vec3 N, mediump vec3 V, mediump
148{ 163{
149 mediump vec3 specularIR = prefilteredReflection(roughness, R); 164 mediump vec3 specularIR = prefilteredReflection(roughness, R);
150 mediump vec2 brdf = texture(brdfLUTmap, vec2(clamp(dot(N, V), 0.0, 1.0), roughness)).rg; 165 mediump vec2 brdf = texture(brdfLUTmap, vec2(clamp(dot(N, V), 0.0, 1.0), roughness)).rg;
151 166
152 mediump vec3 F = f_schlickR(max(dot(N, V), 0.0), F0, roughness); 167 mediump vec3 F = f_schlickR(max(dot(N, V), 0.0), F0, roughness);
153 168
154 mediump vec3 diffIR = RGBMDecode(texture(irradianceMap, N)); 169 mediump vec3 diffuseIR = texture(irradianceMap, N).rgb;
155 mediump vec3 kD = vec3(1.0 - F) * (1.0 - metallic);// Diffuse factor 170 mediump vec3 kD = vec3(1.0 - F) * (1.0 - metallic);// Diffuse factor
156 return albedo * kD * diffIR + specularIR * (F * brdf.x + brdf.y); 171
172 return albedo * kD * diffuseIR + specularIR * (F * brdf.x + brdf.y);
157} 173}
158 174
159#ifdef NORMAL_MAP 175#ifdef NORMAL_MAP
@@ -181,48 +197,64 @@ void main()
181 // calculate the reflection vector. The reflection vector is a reflected View vector on the surface. 197 // calculate the reflection vector. The reflection vector is a reflected View vector on the surface.
182 mediump vec3 R = -normalize(reflect(V, N)); 198 mediump vec3 R = -normalize(reflect(V, N));
183 199
184 mediump vec2 metallicRoughness = inMetallicRoughness;
185
186 mediump vec4 albedo = vec4(rgb, 1.0);
187
188#ifdef MATERIAL_TEXTURES 200#ifdef MATERIAL_TEXTURES
189 metallicRoughness *= texture(metallicRoughnessMap, inTexCoord).bg; 201 mediump vec3 temp = texture(metallicRoughnessMap, inTexCoord).rgb;
202 mediump float metallic = temp.b;
203 mediump float roughness = temp.g;
204 mediump float occlusion = temp.r;
205
206 mediump vec4 albedo = texture(albedoMap, inTexCoord);
190 207
191 mediump vec4 albedoTex = texture(albedoMap, inTexCoord); 208 mediump vec3 emissive = texture(emissiveMap, inTexCoord).rgb * uboDynamic.emissiveIntensity;
192 albedo.rgb *= albedoTex.rgb; 209#else
193 albedo.a = albedoTex.a; 210 mediump float metallic = materials.mat[inInstanceIndex].metallic;
211 mediump float roughness = materials.mat[inInstanceIndex].roughness;
194 212
195 mediump vec3 emissive = texture(emissiveMap, inTexCoord).rgb * uboPerModel.emissiveScale; 213 mediump vec4 albedo = vec4(materials.mat[inInstanceIndex].albedo, 1.0);
196#endif 214#endif
197 215
198 // The base color has two different interpretations depending on the value of metalness. 216
199 // When the material is a metal, the base color is the specific measured reflectance value at normal incidence (F0). 217 // The base colour has two different interpretations depending on the value of metalness.
200 // For a non-metal the base color represents the reflected diffuse color of the material. 218 // When the material is a metal, the base colour is the specific measured reflectance value at normal incidence (F0).
219 // For a non-metal the base colour represents the reflected diffuse colour of the material.
201 // In this model it is not possible to specify a F0 value for non-metals, and a linear value of 4% (0.04) is used. 220 // In this model it is not possible to specify a F0 value for non-metals, and a linear value of 4% (0.04) is used.
202 mediump vec3 F0 = mix(vec3(0.04), albedo.rgb, metallicRoughness.r); 221 mediump vec3 F0 = mix(vec3(0.04), albedo.rgb, metallic);
203 222
204 mediump vec3 color = vec3(0.0); 223 mediump vec3 color = vec3(0.0);
205 224
206 // Compute the direction light diffuse and specular 225 // Compute the direction light diffuse and specular
207 //mediump vec3 dirLightDiffuseSpec = computeLight(V, N, F0, albedo.rgb, metallicRoughness.r, metallicRoughness.g); 226 // highp vec3 dirLightDiffuseSpec = computeLight(V, N, F0, albedo.rgb, metallic, roughness);
208 //color += dirLightDiffuseSpec; 227 // colour = dirLightDiffuseSpec;
209 228
210 // IBL 229 // IBL
211 mediump vec3 envLighting = computeEnvironmentLighting(N, V, R, albedo.rgb, F0, metallicRoughness.r, metallicRoughness.g); 230 mediump vec3 envLighting = computeEnvironmentLighting(N, V, R, albedo.rgb, F0, metallic, roughness);
212 231
213 color += envLighting;
214#ifdef MATERIAL_TEXTURES 232#ifdef MATERIAL_TEXTURES
233 envLighting = envLighting * vec3(occlusion);
215 color += emissive; 234 color += emissive;
216#endif 235#endif
217 236
237 color += envLighting;
238
239 // This seemingly strange clamp is to ensure that the final colour stays within the constraints
240 // of 16-bit floats (13848) with a bit to spare, as the tone mapping calculations squares
241 // this number. It does not affect the final image otherwise, as the clamp will only bring the value to
242 // 50. This would already be very close to saturated (producing something like .99 after tone mapping),
243 // but it was trivial to tweak the tone mapping to ensure 50 produces a value >=1.0.
244 // It is important to remember that this clamping must only happen last minute, as we need to have
245 // the full brightness available for post processing calculations (e.g. bloom)
246
247 mediump vec3 finalColor = min(color.rgb, 50. / uboDynamic.exposure);
248 finalColor *= uboDynamic.exposure;
249
218 // http://filmicworlds.com/blog/filmic-tonemapping-operators/ 250 // http://filmicworlds.com/blog/filmic-tonemapping-operators/
219 // Reinhard tonemapping 251 // Our favourite is the optimized formula by Jim Hejl and Richard Burgess-Dawson
220 mediump vec3 ldrColor = color * ExposureBias; 252 // We particularly like its high contrast and the fact that it also takes care
221 ldrColor = ldrColor / (1.0 + ldrColor); 253 // of Gamma.
254 // As mentioned, we modified the values a bit to ensure it saturates at 50.
222 255
223#ifndef FRAMEBUFFER_SRGB 256 mediump vec3 x = max(vec3(0.), finalColor - vec3(0.004));
224 ldrColor = pow(ldrColor, vec3(0.454545)); 257 finalColor = (x * (6.2 * x + .49)) / (x * (6.175 * x + 1.7) + 0.06);
225#endif
226 258
227 outColor = vec4(ldrColor, albedo.a); 259 outColor = vec4(finalColor, albedo.a);
228} \ No newline at end of file 260} \ No newline at end of file
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRVertShader.vsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRVertShader.vsh
index 7d3c94e..8512cd5 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRVertShader.vsh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PBRVertShader.vsh
@@ -1,104 +1,50 @@
1#version 310 es 1#version 310 es
2layout(location = 0)in highp vec3 inVertex; 2layout(location = 0)in highp vec3 inVertex;
3layout(location = 1)in highp vec3 inNormal; 3layout(location = 1)in highp vec3 inNormal;
4layout(location = 2)in mediump vec2 inTexCoord; 4layout(location = 2)in mediump vec2 inTexCoord;
5layout(location = 3)in highp vec4 inTangent; 5layout(location = 3)in highp vec4 inTangent;
6 6
7layout(std140, binding = 1) uniform UboDynamic 7layout(std140, binding = 1) uniform UboDynamic
8{ 8{
9 highp vec3 camPos;
10 highp mat4 VPMatrix; 9 highp mat4 VPMatrix;
10 highp vec3 camPos;
11 mediump float emissiveIntensity;
12 mediump float exposure;
11} uboDynamic; 13} uboDynamic;
12 14
13layout(std140, binding = 2) uniform UboPerModel 15layout(std140, binding = 2) uniform UboPerModel
14{ 16{
15 highp mat4 ModelMatrix; 17 highp mat4 modelMatrix;
16 mediump float emissiveScale;
17} uboPerModel; 18} uboPerModel;
18 19
19#ifndef INSTANCING
20layout(location = 0) uniform mediump vec2 metallicityRoughness;
21layout(location = 1) uniform mediump vec3 rgb;
22#endif
23
24layout(location = 0) out highp vec3 outWorldPos; 20layout(location = 0) out highp vec3 outWorldPos;
25layout(location = 1) out mediump vec3 outNormal; 21layout(location = 1) out mediump vec3 outNormal;
26layout(location = 2) out mediump vec2 TexCoord; 22layout(location = 2) flat out mediump int outInstanceIndex;
27layout(location = 3) out mediump vec2 outMetallicRoughness;
28layout(location = 4) out mediump vec3 outRgb;
29layout(location = 5) out mediump vec3 outTangent;
30layout(location = 6) out mediump vec3 outBitTangent;
31
32#ifdef INSTANCING
33// https://seblagarde.wordpress.com/2011/08/17/feeding-a-physical-based-lighting-mode/
34const vec3 MaterialRGB[] = vec3[]
35(
36 vec3(0.951519, 0.959915, 0.955324), // silver
37 vec3(1.0, 0.765557, 0.336057), // Colored metal
38 vec3(0.5f, 0.5, 0.5f), // plastic
39 vec3(0.02f, 0.01f, 0.2f) // Colored plastic
40);
41 23
42// r: metallic 24// Material textures
43// g: roughness 25layout(location = 3) out mediump vec2 outTexCoord;
44const vec2 MetallicRoughness[] = vec2[] 26layout(location = 4) out mediump vec3 outTangent;
45( 27layout(location = 5) out mediump vec3 outBitTangent;
46// METALLIC
47vec2(1.0, 0.00),
48vec2(1.0, 0.25),
49vec2(1.0, 0.40),
50vec2(1.0, 0.60),
51vec2(1.0, 0.80),
52vec2(1.0, 1.0),
53
54vec2(1.0, 0.00),
55vec2(1.0, 0.25),
56vec2(1.0, 0.40),
57vec2(1.0, 0.60),
58vec2(1.0, 0.80),
59vec2(1.0, 1.0),
60
61// PLASTIC
62vec2(0.0, 0.00),
63vec2(0.0, 0.25),
64vec2(0.0, 0.40),
65vec2(0.0, 0.60),
66vec2(0.0, 0.80),
67vec2(0.0, 1.0),
68
69vec2(0.0, 0.00),
70vec2(0.0, 0.25),
71vec2(0.0, 0.40),
72vec2(0.0, 0.60),
73vec2(0.0, 0.80),
74vec2(0.0, 1.0)
75);
76#endif
77 28
78void main() 29void main()
79{ 30{
80 gl_Position = uboPerModel.ModelMatrix * vec4(inVertex, 1.0); 31 highp vec4 posTmp = uboPerModel.modelMatrix * vec4(inVertex, 1.0);
81 32 outNormal = normalize(transpose(inverse(mat3(uboPerModel.modelMatrix))) * inNormal);
82 // Sphere 33
83#ifdef INSTANCING 34 outInstanceIndex = gl_InstanceID;
35
36#ifdef MATERIAL_TEXTURES
37 // Helmet - Uses tangent space and material textures
38 outTexCoord = inTexCoord;
39 outTangent = inTangent.xyz;
40 outBitTangent = cross(inNormal, inTangent.xyz) * inTangent.w;
41#else
42 // Sphere - Uses instancing to modify the world position, so as to create the grid
84 highp float x = -float(gl_InstanceID % 6) * 10.0 + 25.; 43 highp float x = -float(gl_InstanceID % 6) * 10.0 + 25.;
85 highp float y = -float(gl_InstanceID / 6) * 10.0 + 15.; 44 highp float y = -float(gl_InstanceID / 6) * 10.0 + 15.;
86 gl_Position.xy += vec2(x,y); 45 posTmp.xy += vec2(x, y);
87
88 // selects the rgb material base color. This is different for each row of the sphere.
89 outMetallicRoughness = MetallicRoughness[gl_InstanceID];
90 outRgb = MaterialRGB[0 + int(gl_InstanceID >= 6) + int(gl_InstanceID >= 12) + int(gl_InstanceID >= 18)];
91
92#else // helmet
93
94 outMetallicRoughness = metallicityRoughness;
95 outRgb = rgb;
96 outTangent = inTangent.xyz;
97 outBitTangent = cross(inNormal, inTangent.xyz) * inTangent.w;
98#endif 46#endif
99 outWorldPos = gl_Position.xyz; 47
100 gl_Position = uboDynamic.VPMatrix * gl_Position;// mvp 48 outWorldPos = posTmp.xyz;
101 49 gl_Position = uboDynamic.VPMatrix * posTmp;
102 outNormal = normalize(transpose(inverse(mat3(uboPerModel.ModelMatrix))) * inNormal);
103 TexCoord = inTexCoord;
104} 50}
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PreFilterFragShader.fsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PreFilterFragShader.fsh
deleted file mode 100644
index 3d6fa89..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PreFilterFragShader.fsh
+++ /dev/null
@@ -1,134 +0,0 @@
1#version 310 es
2#define PI 3.14159265358
3
4layout (location = 0) in highp vec3 inPos;
5layout (location = 0) out mediump vec4 outColor0;
6layout (location = 1) out mediump vec4 outColor1;
7
8layout(binding = 0) uniform highp samplerCube envMap;
9
10layout(location = 1) uniform highp float roughness;
11layout(location = 2) uniform highp float mipLevelUniform;
12
13const highp float HDR_SCALER = 100.0;
14highp vec2 hammersley(uint i, uint N)
15{
16 highp float vdc = float(bitfieldReverse(i)) * 2.3283064365386963e-10; // Van der Corput
17 return vec2(float(i) / float(N), vdc);
18}
19
20// Normal Distribution function
21highp float D_GGX(highp float dotNH, highp float roughness)
22{
23 highp float a = roughness * roughness;
24 highp float a2 = a * a;
25 highp float denom = dotNH * dotNH * (a2 - 1.0) + 1.0;
26 return a2 /(PI * denom * denom);
27}
28
29// Sourced from http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf
30highp vec3 importanceSampleCGX(highp vec2 xi, highp float roughness, highp vec3 N)
31{
32 highp float a = roughness * roughness;
33 highp float phi = 2.0 * PI * xi.x;
34 highp float cosTheta = sqrt( (1.0f - xi.y) / ( 1.0f + (a*a - 1.0f) * xi.y ));
35 highp float sinTheta = sqrt( 1.0f - cosTheta * cosTheta);
36 highp vec3 h = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
37 highp vec3 upVector = abs(N.z) < 0.999f ? vec3(0.0f,0.0f,1.0f) : vec3(1.0f,0.0f,0.0f);
38 highp vec3 tangentX = normalize( cross( upVector, N ) );
39 highp vec3 tangentY = cross( N, tangentX );
40 // Tangent to world space
41 return (tangentX * h.x) + (tangentY * h.y) + (N * h.z);
42}
43
44
45//http://graphicrants.blogspot.com/2009/04/rgbm-color-encoding.html
46mediump vec4 RGBMEncode( highp vec3 color )
47{
48 highp vec4 rgbm;
49 color *= 1.0 / 6.0;
50 rgbm.a = clamp( max( max( color.r, color.g ), max( color.b, 1e-6 ) ), 0.0, 1.0);
51 rgbm.a = ceil(rgbm.a * 255.0) / 255.0;
52 rgbm.rgb = color / rgbm.a;
53 return rgbm;
54}
55
56// Sourced from http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf
57void preFilterEnvMap(highp vec3 R, highp float roughness)
58{
59 highp vec3 N = R;
60 highp vec3 V = R;
61
62 highp vec4 result0 = vec4(0.);
63 highp vec4 result1 = vec4(0.);
64 highp const uint numSamples = 65536u;
65 highp float mapSize = float(textureSize(envMap, 0).x);
66
67 // color 1: output the mip mapping.
68 {
69 highp vec2 Xi = hammersley(0u, numSamples);
70 highp vec3 H = importanceSampleCGX(Xi, roughness, N);
71 highp vec3 L = 2.0 * dot(V, H) * H - V;
72 highp float NoL = clamp(dot(N, L), 0.0, 1.0);
73
74 highp vec4 tmpEnv = vec4(texture(envMap, L).rgb * NoL, 0.0);
75 highp float tmpLight = tmpEnv.a;
76 tmpLight = HDR_SCALER * tmpLight * tmpLight + 1.0;
77 result1 = tmpEnv * tmpLight;
78 }
79
80 highp float omegaP = 4.0 * PI / (6.0 * mapSize * mapSize);
81 highp float mipBias = 1.0f; // Original paper suggest biasing the mip to improve the results
82
83 for(uint i = 0u; i < numSamples; ++i)
84 {
85 highp vec2 Xi = hammersley(i, numSamples);
86 highp vec3 H = importanceSampleCGX(Xi, roughness, N);
87 highp vec3 L = 2.0 * dot(V, H) * H - V;
88
89 highp float NoL = max(dot(N, L), 0.0);
90 if(NoL > 0.0)
91 {
92 if(roughness == 0.0)
93 {
94 highp vec4 tmpEnv = vec4(textureLod(envMap, L, 0.0).rgb * NoL, 0.0);
95 highp float tmpLight = tmpEnv.a;
96 tmpLight = HDR_SCALER * tmpLight * tmpLight + 1.0;
97 result0 = tmpEnv * tmpLight;
98 break;
99 }
100
101 // optmize\d: https://placeholderart.wordpress.com/2015/07/28/implementation-notes-runtime-environment-map-filtering-for-image-based-lighting/
102 highp float NoH = max(dot(N, H), 0.0);
103 highp float VoH = max(dot(V,H), 0.0);
104 highp float NoV = max(dot(N, V), 0.0);
105 // Probability Distribution Function
106 highp float pdf = D_GGX(NoH, roughness) * NoH / ((4.0f * VoH) + 0.0001) /*avoid division by 0*/;
107
108 // Solid angle represented by this sample
109 highp float omegaS = 1.0 / (float(numSamples) * pdf);
110 // Solid angle covered by 1 pixel with 6 faces that are EnvMapSize X EnvMapSize
111
112 highp float mipLevel = max(0.5 * log2(omegaS / omegaP) + mipBias, 0.0f);
113
114 mediump vec4 tmpEnv = textureLod(envMap, L, mipLevel);
115 tmpEnv.rgb = tmpEnv.rgb * NoL;
116
117 highp float tmpLight = tmpEnv.a * NoL;
118 tmpLight = HDR_SCALER * tmpLight * tmpLight + 1.0;
119 result0 += vec4(tmpEnv.rgb * tmpLight, NoL);
120 }
121 }
122
123 if(result0.w != 0.0)
124 {
125 result0.rgb = result0.rgb / result0.w;// divide by the weight
126 }
127 outColor0 = RGBMEncode(result0.rgb);
128 outColor1 = RGBMEncode(result1.rgb);
129}
130
131void main()
132{
133 preFilterEnvMap(normalize(inPos), roughness);
134} \ No newline at end of file
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterEnvMap.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterEnvMap.pvr
deleted file mode 100644
index 4091fb7..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterEnvMap.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterL0MipMap.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterL0MipMap.pvr
deleted file mode 100644
index 121d0be..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/PrefilterL0MipMap.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/SkyboxFragShader.fsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/SkyboxFragShader.fsh
index 4d92b36..12f4638 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/SkyboxFragShader.fsh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/SkyboxFragShader.fsh
@@ -1,13 +1,11 @@
1#version 310 es 1#version 310 es
2 2
3layout (binding = 8) uniform samplerCube skyboxMap; 3layout (binding = 9) uniform samplerCube skyboxMap;
4layout (location = 0) out mediump vec4 outColor; 4layout (location = 0) out mediump vec4 outColor;
5 5
6layout(location = 0) in mediump vec3 inRayDir; 6layout(location = 0) in mediump vec3 inRayDir;
7 7
8const mediump float HDR_SCALER = 100.0f; 8layout (location = 3) uniform mediump float exposure;
9
10const mediump float ExposureBias = 4.0;
11 9
12void main() 10void main()
13{ 11{
@@ -15,23 +13,26 @@ void main()
15 mediump vec3 RayDir = inRayDir; 13 mediump vec3 RayDir = inRayDir;
16 14
17 mediump vec4 color = texture(skyboxMap, RayDir); 15 mediump vec4 color = texture(skyboxMap, RayDir);
18 highp float tmpLight = color.a; 16
19 tmpLight = HDR_SCALER * tmpLight * tmpLight + 1.0; 17 // This seemingly strange clamp is to ensure that the final colour stays within the constraints
20 color.rgb = color.rgb * tmpLight; 18 // of 16-bit floats (~640000) with a bit to spare, as the tone mapping calculations squares
19 // this number. Taking account compiler optimisations which may overflow intermediate results
20 // into undefined values, we should clamp this value so that its maximum is safely lower than that.
21 // It does not affect the final image otherwise, as the clamp will only bring the value to
22 // around ~50, which is already saturated.
23 // It is important to remember that this clamping must only happen last minute, JUST before tone mapping,
24 // as we would want to have the full brightness available for post processing calculations (e.g. bloom)
25
26 mediump vec3 toneMappedColor = min(color.rgb, 50. / exposure);
27 toneMappedColor *= exposure;
28
21 29
22 // http://filmicworlds.com/blog/filmic-tonemapping-operators/ 30 // http://filmicworlds.com/blog/filmic-tonemapping-operators/
23 // Reinhard tonemapping 31 // Our favourite is the optimized formula by Jim Hejl and Richard Burgess-Dawson
24 mediump vec3 ldrColor = color.rgb * ExposureBias; 32 // We particularly like its high contrast and the fact that it is very cheap, with
25 ldrColor = ldrColor / (1.0 + ldrColor); 33 // only 4 mads and a reciprocal.
34 mediump vec3 x = max(vec3(0.), toneMappedColor - vec3(0.004));
35 toneMappedColor = (x * (6.2 * x + .49)) / (x * (6.175 * x + 1.7) + 0.06);
26 36
27#ifndef FRAMEBUFFER_SRGB 37 outColor = vec4(toneMappedColor, 1.0);
28 ldrColor = pow(ldrColor, vec3(0.454545));
29#endif
30 outColor = vec4(ldrColor, 1.0);
31} 38}
32
33
34
35
36
37
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/damagedHelmet.gltf b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/damagedHelmet.gltf
index 393fac0..ef1092a 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/damagedHelmet.gltf
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/damagedHelmet.gltf
@@ -93,16 +93,13 @@
93 "uri": "Default_albedo.pvr" 93 "uri": "Default_albedo.pvr"
94 }, 94 },
95 { 95 {
96 "uri": "Default_MetalSmooth_converted_metalRoughness.pvr" 96 "uri": "Default_occlusionRoughnessMetallic.pvr"
97 }, 97 },
98 { 98 {
99 "uri": "Default_normal.pvr" 99 "uri": "Default_normal.pvr"
100 }, 100 },
101 { 101 {
102 "uri": "Default_emissive.pvr" 102 "uri": "Default_emissive.pvr"
103 },
104 {
105 "uri": "Default_AO.pvr"
106 } 103 }
107 ], 104 ],
108 "materials": [ 105 "materials": [
@@ -131,7 +128,7 @@
131 }, 128 },
132 "emissiveFactor": [1, 1, 1], 129 "emissiveFactor": [1, 1, 1],
133 "occlusionTexture" : { 130 "occlusionTexture" : {
134 "index" : 4, 131 "index" : 1,
135 "texCoord" : 0, 132 "texCoord" : 0,
136 "strength" : 0.632 133 "strength" : 0.632
137 }, 134 },
@@ -203,10 +200,6 @@
203 { 200 {
204 "sampler": 0, 201 "sampler": 0,
205 "source": 3 202 "source": 3
206 },
207 {
208 "sampler": 0,
209 "source": 4
210 } 203 }
211 ] 204 ]
212} \ No newline at end of file 205} \ No newline at end of file
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/MonValley_baked_lightmap.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5.pvr
index 849ba76..bd9eeb5 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/MonValley_baked_lightmap.pvr
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Irradiance.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Irradiance.pvr
new file mode 100644
index 0000000..7996d22
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Irradiance.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Prefiltered.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Prefiltered.pvr
new file mode 100644
index 0000000..634fb9f
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/misty_pines_rgb9e5_Prefiltered.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5.pvr
new file mode 100644
index 0000000..469ae34
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Irradiance.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Irradiance.pvr
new file mode 100644
index 0000000..69976e4
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Irradiance.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Prefiltered.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Prefiltered.pvr
new file mode 100644
index 0000000..d0baeb9
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESImageBasedLighting/satara_night_scale_0.305_rgb9e5_Prefiltered.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/FragShader.fsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/FragShader.fsh
index eebaca5..f76900f 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/FragShader.fsh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/FragShader.fsh
@@ -18,22 +18,26 @@ varying mediump vec2 vTexCoord;
18 18
19void main() 19void main()
20{ 20{
21 mediump vec3 color; 21 mediump vec3 color = vec3 (0.,0.,0.);
22 // This is the black borders if we move out of range
23 if ((vTexCoord.x >=0.) && (vTexCoord.y >=0.) && (vTexCoord.x <=1.) && (vTexCoord.y <=1.))
24 {
22#if !defined(IOS) 25#if !defined(IOS)
23 color = texture2D(Sampler, vTexCoord).rgb; 26 color = texture2D(Sampler, vTexCoord).rgb;
24#else 27#else
25 mediump vec3 yuv; 28 mediump vec3 yuv = vec3(0.,0.,0.);
26 yuv.x = texture2D(SamplerY, vTexCoord).r; 29 yuv.x = texture2D(SamplerY, vTexCoord).r;
27 yuv.yz = texture2D(SamplerUV, vTexCoord).ra - vec2(0.5, 0.5); 30 yuv.yz = texture2D(SamplerUV, vTexCoord).ra - vec2(0.5, 0.5);
28 31
29 // BT.709 - Convert from yuv to rgb 32 // BT.709 - Convert from yuv to rgb
30 color = mat3(1.0, 1.0, 1.0, 33 color = mat3(1.0, 1.0, 1.0,
31 0.0, -.18732, 1.8556, 34 0.0, -.18732, 1.8556,
32 1.57481, -.46813, 0.0) * yuv; 35 1.57481, -.46813, 0.0) * yuv;
33#endif 36#endif
34 //Any effect can be applied here - for example, a nightvision effect... 37 }
38 //Any effect can be applied here - for example, a night vision effect...
35 mediump float intensity = dot(vec3(0.30, 0.59, 0.11), color); 39 mediump float intensity = dot(vec3(0.30, 0.59, 0.11), color);
36 gl_FragColor.xyz = intensity * vec3(0.2, 1.0, .2); 40 gl_FragColor.xyz = intensity * vec3(0.2, 1.0, .2);
37 gl_FragColor.w = 1.0; 41 gl_FragColor.w = 1.0;
38 // NO gamma correction, the values from the camera coming in are sRGB values 42 // NO gamma correction, the values from the camera coming in are sRGB values
39} \ No newline at end of file 43} \ No newline at end of file
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/VertShader.vsh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/VertShader.vsh
index 24e7b29..b0cac7c 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/VertShader.vsh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingPVRCamera/VertShader.vsh
@@ -7,5 +7,6 @@ void main()
7{ 7{
8 mediump vec2 madd = vec2(.5,.5); 8 mediump vec2 madd = vec2(.5,.5);
9 gl_Position = vec4(inVertex,0.,1.); 9 gl_Position = vec4(inVertex,0.,1.);
10 vTexCoord = (uvTransform * vec4(inVertex * madd + madd ,0.,1.)).xy; 10 mediump vec3 tr = (uvTransform * vec4(inVertex * madd + madd, 0., 1.)).xyw;
11 vTexCoord = tr.xy/tr.z;
11} 12}
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36.pvr
new file mode 100644
index 0000000..4bb3f1a
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36_rgb.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36_rgb.pvr
deleted file mode 100644
index c724771..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/arial_36_rgb.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60.pvr
new file mode 100644
index 0000000..7cebc16
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60_rgb.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60_rgb.pvr
deleted file mode 100644
index fa0b32c..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/starjout_60_rgb.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36.pvr
new file mode 100644
index 0000000..f4fc5fb
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36_rgb.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36_rgb.pvr
deleted file mode 100644
index e170b52..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_36_rgb.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46.pvr
new file mode 100644
index 0000000..b1ae9b7
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46_rgb.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46_rgb.pvr
deleted file mode 100644
index 4e999fe..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_46_rgb.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56.pvr
new file mode 100644
index 0000000..a805d99
--- /dev/null
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56_rgb.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56_rgb.pvr
deleted file mode 100644
index 20f938f..0000000
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESIntroducingUIRenderer/title_56_rgb.pvr
+++ /dev/null
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation2D/font.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation2D/font.pvr
index 492cba2..730f4f1 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation2D/font.pvr
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation2D/font.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation3D/font.pvr b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation3D/font.pvr
index 3a41f02..8a7f52d 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation3D/font.pvr
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESNavigation3D/font.pvr
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESParticleSystem/ParticleSolver.csh b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESParticleSystem/ParticleSolver.csh
index 007afcc..24caeec 100644
--- a/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESParticleSystem/ParticleSolver.csh
+++ b/targetfs/arm64/Examples/Advanced/Wayland/Assets_OpenGLESParticleSystem/ParticleSolver.csh
@@ -133,12 +133,12 @@ void main()
133 133
134 //Simulate particle movement: 134 //Simulate particle movement:
135 // Mass is implicitly "1" just to simplify calculations. 135 // Mass is implicitly "1" just to simplify calculations.
136 //Semi-implicit euler is the best of the "completely basic", forward integration methods - it has better 136 //Semi-implicit Euler is the best of the "completely basic", forward integration methods - it has better
137 //behaviour than explicit Euler basically for free. Error is of the same order as Explicit Euler, but it 137 //behaviour than explicit Euler basically for free. Error is of the same order as Explicit Euler, but it
138 //is much more stable as it normally retains energy. 138 //is much more stable as it normally retains energy.
139 //Explicit Euler is : x1 = x0 + v0.dt, then: v1 = v0 + a0*dt 139 //Explicit Euler is : x1 = x0 + v0.dt, then: v1 = v0 + a0*dt
140 140
141 //Semi - Implicit euler is : v1 = v0 + a0*dt, then: x1 = x0 + v1*dt (we will use this) 141 //Semi - Implicit Euler is : v1 = v0 + a0*dt, then: x1 = x0 + v1*dt (we will use this)
142 //OR : x1 = x0 + v0*dt, then: v1 = v0 + a1*dt 142 //OR : x1 = x0 + v0*dt, then: v1 = v0 + a1*dt
143 143
144 144
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESDeferredShading b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESDeferredShading
index e880c8d..1a17eac 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESDeferredShading
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESDeferredShading
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESGaussianBlur b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESGaussianBlur
index bf1498f..64f1b23 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESGaussianBlur
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESGaussianBlur
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESImageBasedLighting b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESImageBasedLighting
index e1dddcc..7453ae6 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESImageBasedLighting
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESImageBasedLighting
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRCamera b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRCamera
index 221ed2b..cd59846 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRCamera
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRCamera
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRUtils b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRUtils
index 8c96f78..2a6a0a0 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRUtils
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingPVRUtils
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingUIRenderer b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingUIRenderer
index f82f1c7..55dede3 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingUIRenderer
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESIntroducingUIRenderer
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation2D b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation2D
index e123847..5c79cb1 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation2D
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation2D
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation3D b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation3D
index 6acde71..7f1361d 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation3D
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESNavigation3D
Binary files differ
diff --git a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESParticleSystem b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESParticleSystem
index 5f7258f..edd6a05 100755
--- a/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESParticleSystem
+++ b/targetfs/arm64/Examples/Advanced/Wayland/OpenGLESParticleSystem
Binary files differ