DXGL r282 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r281
|
r282
|
r283
>
Date:
01:03, 11 December 2012
Author:
admin
Status:
new
Tags:
Comment:
Partially fix ambient calculation.
Modified paths:
/ddraw/shadergen.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/shadergen.cpp
—
—
@@ -279,7 +279,7 @@
280
280
static const char op_dirlight[] = "DirLight(lightX);\n";
281
281
static const char op_pointlight[] = "PointLight(lightX);\n";
282
282
static const char op_spotlight[] = "SpotLight(lightX);\n";
283
-static const char op_colorout[] = "gl_FrontColor = (gl_FrontMaterial.diffuse * diffuse) + (gl_FrontMaterial.ambient + ambient)\n\
283
+static const char op_colorout[] = "gl_FrontColor = (gl_FrontMaterial.diffuse * diffuse) + (gl_FrontMaterial.ambient * ambient)\n\
284
284
+ (gl_FrontMaterial.specular * specular) + gl_FrontMaterial.emission;\n\
285
285
gl_FrontSecondaryColor = (gl_FrontMaterial.specular * specular);\n";
286
286
static const char op_colorvert[] = "gl_FrontColor = rgba0.bgra;\n";
—
—
@@ -528,7 +528,7 @@
529
529
if((matcolor == D3DMCS_COLOR1) && hascolor1) vsrc->append(colorargs[4]);
530
530
else if((matcolor == D3DMCS_COLOR2) && hascolor2) vsrc->append(colorargs[5]);
531
531
else vsrc->append(colorargs[1]);
532
- vsrc->append(" + ambient)\n+ (");
532
+ vsrc->append(" * ambient)\n+ (");
533
533
matcolor = ((id>>25)&3);
534
534
if((matcolor == D3DMCS_COLOR1) && hascolor1) vsrc->append(colorargs[4]);
535
535
else if((matcolor == D3DMCS_COLOR2) && hascolor2) vsrc->append(colorargs[5]);
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