mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
This is a "Try to fix" commit, reverted all the changes made by my first commit that could affect texturing, so please everyone with texture problems please test this, also in opengl let the viewport calculations the way they where, opengl can handle any values in the viewport.
in direct3d this is different, the only valid values are between 0.0 an 1.0 so fix this and let the shader handle the rest. please test all this and let me know the results. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4494 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -319,7 +319,7 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||
void PixelShaderCache::DisableShader()
|
||||
{
|
||||
CurrentShader = 0;
|
||||
if(ShaderEnabled)
|
||||
//if(ShaderEnabled)
|
||||
{
|
||||
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader);
|
||||
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
@ -332,7 +332,7 @@ void PixelShaderCache::DisableShader()
|
||||
void PixelShaderCache::SetCurrentShader(GLuint Shader)
|
||||
{
|
||||
//The caching here breakes Super Mario Sunshine i'm still trying to figure out wy
|
||||
if(ShaderEnabled /*&& CurrentShader != Shader*/)
|
||||
//if(ShaderEnabled /*&& CurrentShader != Shader*/)
|
||||
{
|
||||
CurrentShader = Shader;
|
||||
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader);
|
||||
@ -342,13 +342,13 @@ void PixelShaderCache::SetCurrentShader(GLuint Shader)
|
||||
//Enable Fragment program and bind initial program
|
||||
void PixelShaderCache::EnableShader(GLuint Shader)
|
||||
{
|
||||
if(!ShaderEnabled)
|
||||
//if(!ShaderEnabled)
|
||||
{
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
ShaderEnabled = true;
|
||||
CurrentShader = 0;
|
||||
}
|
||||
if(CurrentShader != Shader)
|
||||
//if(CurrentShader != Shader)
|
||||
{
|
||||
CurrentShader = Shader;
|
||||
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader);
|
||||
|
Reference in New Issue
Block a user