Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shader-generator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
turtle3d
shader-generator
Commits
6cb23930
Verified
Commit
6cb23930
authored
Mar 21, 2020
by
insert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix.
parent
7b2ed2fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/fragment/lighting/shadows.glsl
src/fragment/lighting/shadows.glsl
+4
-3
No files found.
src/fragment/lighting/shadows.glsl
View file @
6cb23930
...
...
@@ -28,10 +28,11 @@ float directional_shadow() {
return
shadow
;
}
float
point_shadow
(
int
shadow
)
{
vec3
fragToLight
=
fPos
-
lightPos
;
float
point_shadow
(
int
i
)
{
PointLight
light
=
pointLights
[
i
];
vec3
fragToLight
=
fPos
-
light
.
position
;
float
closestDepth
=
texture
(
pointLights
[
shadow
]
.
shadowMap
,
fragToLight
).
r
;
float
closestDepth
=
texture
(
light
.
shadowMap
,
fragToLight
).
r
;
closestDepth
*=
far_plane
;
float
currentDepth
=
length
(
fragToLight
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment