Skip to content

Commit

Permalink
PBRLighting.glsllib: fix by Ryan
Browse files Browse the repository at this point in the history
  • Loading branch information
capdevon committed Feb 24, 2024
1 parent 81105d1 commit 17a9651
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions src/main/resources/ShaderLib/PBRLighting.glsllib
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
#import "Common/ShaderLib/Lighting.glsllib"
#import "ShaderLib/PBR.glsllib"

//declare PBR Lighting vars
uniform vec4 g_LightData[NB_LIGHTS];
uniform vec3 g_CameraPosition;
uniform vec4 g_AmbientLightColor;

#if NB_PROBES >= 1
uniform samplerCube g_PrefEnvMap;
uniform vec3 g_ShCoeffs[9];
uniform mat4 g_LightProbeData;
#endif
#if NB_PROBES >= 2
uniform samplerCube g_PrefEnvMap2;
uniform vec3 g_ShCoeffs2[9];
uniform mat4 g_LightProbeData2;
#endif
#if NB_PROBES == 3
uniform samplerCube g_PrefEnvMap3;
uniform vec3 g_ShCoeffs3[9];
uniform mat4 g_LightProbeData3;
#endif


vec3 calculatePBRLighting(){
//vec3 calculatePBRLighting(in vec4 albedo, in float Metallic, in float Roughness, in vec4 specularColor, in float glossiness, in vec3 lightMapColor, in vec3 ao, in float indoorSunLightExposure, in vec3 normal, in vec3 norm, in vec3 viewDir){
vec3 finalLightingValue;
//vec3 calculatePBRLighting(){
vec3 calculatePBRLighting(in vec4 albedo, in float Metallic, in float Roughness, in vec4 specularColor, in float glossiness, in vec3 lightMapColor, in vec3 ao, in float indoorSunLightExposure, in vec3 normal, in vec3 norm, in vec3 viewDir){
vec3 finalLightingValue = vec3(0.0, 0.0, 0.0);

#ifdef SPECGLOSSPIPELINE
vec4 diffuseColor = albedo;// * (1.0 - max(max(specularColor.r, specularColor.g), specularColor.b));
Expand Down

0 comments on commit 17a9651

Please sign in to comment.