-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Addresses issue #6587 #6665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Addresses issue #6587 #6665
Changes from 1 commit
227fe69
8e2d05c
317d915
917de2f
5139c0a
45e33d5
1d54fad
1ff8702
6cd7856
4401ebd
37751d9
93b8b50
66dc0dc
cffda69
751b16a
29e7a14
7981fdc
e7cd392
f30af0e
d51c4a8
38bcaab
2558755
773198a
bbc7c72
ffd9097
cc77e7e
518b0f0
c124738
38e6e84
a585ef5
f118a3b
2da03d1
5961be8
4515c09
be6d27f
6dc9916
3133e80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,7 @@ uniform float uQuadraticAttenuation; | |
| // boolean to initiate the calculateImageDiffuse and calculateImageSpecular | ||
| uniform bool uUseImageLight; | ||
| // texture for use in calculateImageDiffuse | ||
| uniform sampler2D environmentMapDiffused; | ||
| uniform sampler2D environmentMapDiffusedCubemap; | ||
| // texture for use in calculateImageSpecular | ||
| uniform sampler2D environmentMapSpecular; | ||
| // roughness for use in calculateImageSpecular | ||
|
|
@@ -111,7 +111,7 @@ vec3 calculateImageDiffuse( vec3 vNormal, vec3 vViewPosition ){ | |
| vec3 worldCameraPosition = vec3(0.0, 0.0, 0.0); // hardcoded world camera position | ||
| vec3 worldNormal = normalize(vNormal); | ||
| vec2 newTexCoor = mapTextureToNormal( worldNormal ); | ||
| vec4 texture = TEXTURE( environmentMapDiffused, newTexCoor ); | ||
| vec4 texture = textureCube( environmentMapDiffusedCubemap, newTexCoor ); | ||
|
||
| // this is to make the darker sections more dark | ||
| // png and jpg usually flatten the brightness so it is to reverse that | ||
| return smoothstep(vec3(0.0), vec3(0.8), texture.xyz); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
samplerCube?