Skip to content

Commit

Permalink
Core assets update for v3.2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofra committed Jul 25, 2022
1 parent bc4744c commit 0e65ace
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
6 changes: 3 additions & 3 deletions orca-bistro/core/shader/default_fs.sc
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ void main() {
float opacity = 1.0;
#endif // USE_OPACITY_MAP

#if DEPTH_ONLY
;
#else // DEPTH_ONLY
#if DEPTH_ONLY != 1
#if FORWARD_PIPELINE_AAA_PREPASS
vec3 N_view = mul(u_view, vec4(N, 0)).xyz;
vec2 velocity = vec2(vProjPos.xy / vProjPos.w - vPrevProjPos.xy / vPrevProjPos.w);
Expand All @@ -241,5 +239,7 @@ void main() {

gl_FragColor = vec4(color, opacity);
#endif // FORWARD_PIPELINE_AAA_PREPASS
#else
gl_FragColor = vec4_splat(0.0); // note: fix required to stop glsl-optimizer from removing the whole function body
#endif // DEPTH_ONLY
}
23 changes: 16 additions & 7 deletions orca-bistro/core/shader/forward_pipeline.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// HARFANG(R) Copyright (C) 2022 Emmanuel Julien, NWNC HARFANG. Released under GPL/LGPL/Commercial Licence, see licence.txt for details.

// DO NOT MODIFY THIS FILE!

#include <bgfx_shader.sh>

#define PI 3.14159265359
Expand Down Expand Up @@ -39,13 +42,19 @@ uniform mat4 uProbeMatrix;
uniform mat4 uInvProbeMatrix;
uniform vec4 uProbeData;

SAMPLERCUBE(uIrradianceMap, 7);
SAMPLERCUBE(uRadianceMap, 8);
SAMPLER2D(uSSIrradianceMap, 9);
SAMPLER2D(uSSRadianceMap, 10);
SAMPLER2D(uBrdfMap, 11);
SAMPLER2D(uNoiseMap, 12);
SAMPLER2D(uAmbientOcclusion, 13);
/*
Reserved texture units for the AAA forward pipeline.
Do not modify these slots, they are hardcoded on the C++ side.

If reserving new slots for the pipeline please keep in mind WebGL limitations: https://webglreport.com/?v=2
At the moment it is not advisable to use texture units beyond 16 for embedded platforms.
*/
SAMPLERCUBE(uIrradianceMap, 8);
SAMPLERCUBE(uRadianceMap, 9);
SAMPLER2D(uSSIrradianceMap, 10);
SAMPLER2D(uSSRadianceMap, 11);
SAMPLER2D(uBrdfMap, 12);
SAMPLER2D(uNoiseMap, 13);
SAMPLER2DSHADOW(uLinearShadowMap, 14);
SAMPLER2DSHADOW(uSpotShadowMap, 15);

Expand Down
2 changes: 2 additions & 0 deletions orca-bistro/core/shader/pbr_fs.sc
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,7 @@ self = (self * self) * 5.0;

gl_FragColor = vec4(color, opacity);
#endif // FORWARD_PIPELINE_AAA_PREPASS
#else
gl_FragColor = vec4_splat(0.0); // note: fix required to stop glsl-optimizer from removing the whole function body
#endif // DEPTH_ONLY
}

0 comments on commit 0e65ace

Please sign in to comment.