DXGL r309 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r308
|
r309
|
r310
>
Date:
19:11, 13 January 2013
Author:
admin
Status:
new
Tags:
Comment:
Add range to point lights.
Modified paths:
/ddraw/shadergen.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/shadergen.cpp
—
—
@@ -342,6 +342,7 @@
343
343
vec3 pos3 = pos.xyz / pos.w;\n\
344
344
vec3 V = light.position - pos3;\n\
345
345
float d = length(V);\n\
346
+if(d > light.range) return;\n\
346
347
V = normalize(V);\n\
347
348
float attenuation = 1.0/(light.constant+(d*light.linear)+((d*d)*light.quad));\n\
348
349
float NdotV = max(0.0,dot(N,V));\n\
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version