DXGL r406 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r405
|
r406
|
r407
>
Date:
00:48, 14 November 2013
Author:
admin
Status:
new
Tags:
Comment:
Simplify blitter vertex shader a bit.
Modified paths:
/ddraw/shadergen2d.cpp
(modified) (
history
)
/ddraw/shaders.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/shadergen2d.cpp
—
—
@@ -43,7 +43,7 @@
44
44
Bit 14: ROP index bit 2
45
45
Bit 15: Use source color key (DDBLT_KEYSRC)
46
46
Bit 16: ROP index bit 3
47
-Bit 17: Use ROP (DDBLT_ROP, forces integer processing)
47
+Bit 17: Use ROP (DDBLT_ROP, may force integer processing)
48
48
Bit 18: ROP index bit 4
49
49
Bit 19: Z-buffer blit (DDBLT_ZBUFFER)
50
50
Bit 20: Use dest. Z constant (DDBLT_ZBUFFERDESTCONSTOVERRIDE)
—
—
@@ -699,4 +699,7 @@
700
700
void CreateShader2D(int index, DWORD id)
701
701
{
702
702
string tmp;
703
+ genshaders2D[index].shader.vsrc = new string;
704
+ genshaders2D[index].shader.fsrc = new string;
705
+
703
706
}
\ No newline at end of file
Index: ddraw/shaders.cpp
—
—
@@ -105,8 +105,6 @@
106
106
void main()\n\
107
107
{\n\
108
108
vec4 xyzw = vec4(xy[0],xy[1],0,1);\n\
109
- vec4 rgba = vec4(rgb[0],rgb[1],rgb[2],1);\n\
110
- vec4 strq = vec4(st[0],st[1],0,1);\n\
111
109
mat4 proj = mat4(\n\
112
110
vec4(2.0 / (view[1] - view[0]), 0, 0, 0),\n\
113
111
vec4(0, 2.0 / (view[2] - view[3]), 0, 0),\n\
—
—
@@ -114,8 +112,8 @@
115
113
vec4(-(view[1] + view[0]) / (view[1] - view[0]),\n\
116
114
-(view[2] + view[3]) / (view[2] - view[3]), -1 , 1));\n\
117
115
gl_Position = proj * xyzw;\n\
118
- gl_FrontColor = rgba;\n\
119
- gl_TexCoord[0] = strq;\n\
116
+ gl_FrontColor = vec4(rgb,1.0);\n\
117
+ gl_TexCoord[0] = vec4(st,0.0,1.0);\n\
120
118
} ";
121
119
122
120
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