DXGL r402 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r401
|
r402
|
r403
>
Date:
14:27, 24 August 2013
Author:
admin
Status:
new
Tags:
Comment:
Index palette entries to middle of texel in palette texture. Fixes compatibility with old Geforce 6 series GPUs.
Modified paths:
/ddraw/shaders.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/shaders.cpp
—
—
@@ -48,7 +48,8 @@
49
49
void main() \n\
50
50
{ \n\
51
51
vec4 myindex = texture2D(tex0, gl_TexCoord[0].xy); \n\
52
- vec4 texel = texture2D(pal, myindex.xy); \n\
52
+ vec2 index = vec2((myindex.x*((255.0/256.0)+(0.5/256.0))),0.5);\n\
53
+ vec4 texel = texture2D(pal, index); \n\
53
54
gl_FragColor = texel; \n\
54
55
} ";
55
56
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