ShaderManager.hpp   ShaderManager.hpp 
skipping to change at line 45 skipping to change at line 45
bool shadowTransform; bool shadowTransform;
bool pixelLighting; bool pixelLighting;
bool bump; bool bump;
bool shadows; bool shadows;
S3DEnum::ShadowFilterQuality shadowFilterQuality; S3DEnum::ShadowFilterQuality shadowFilterQuality;
bool pcss; bool pcss;
bool geometryShader; bool geometryShader;
bool torchLight; bool torchLight;
//for now, only 1 or 4 really supported //for now, only 1 or 4 really supported
int frustumSplits; int frustumSplits;
bool hwShadowSamplers;
}; };
//! A simple shader cache class that gives us the correct shader depending on desired configuration. //! A simple shader cache class that gives us the correct shader depending on desired configuration.
//! It also contains a uniform cache to avoid unnecessary glUniformLocation calls //! It also contains a uniform cache to avoid unnecessary glUniformLocation calls
class ShaderMgr class ShaderMgr
{ {
public: public:
ShaderMgr(); ShaderMgr();
~ShaderMgr(); ~ShaderMgr();
skipping to change at line 202 skipping to change at line 203
//shader uses an additional point light positioned at the ca mera that performs additional diffuse illumination //shader uses an additional point light positioned at the ca mera that performs additional diffuse illumination
TORCH = (1<<15), TORCH = (1<<15),
//debug shader for AABBs/Frustums //debug shader for AABBs/Frustums
DEBUG = (1<<16), DEBUG = (1<<16),
//PCSS shadow filtering //PCSS shadow filtering
PCSS = (1<<17), PCSS = (1<<17),
//only a single shadow frustum is used //only a single shadow frustum is used
SINGLE_SHADOW_FRUSTUM = (1<<18), SINGLE_SHADOW_FRUSTUM = (1<<18),
//set if opengl es2 //set if opengl es2
OGL_ES2 = (1<<19), OGL_ES2 = (1<<19),
//true if shadow samplers (shadow2d) should be used for shad
ow maps instead of normal samplers (texture2d)
HW_SHADOW_SAMPLERS = (1<<20)
}; };
typedef QMap<QString,FeatureFlags> t_FeatureFlagStrings; typedef QMap<QString,FeatureFlags> t_FeatureFlagStrings;
static t_FeatureFlagStrings featureFlagsStrings; static t_FeatureFlagStrings featureFlagsStrings;
QString getVShaderName(uint flags); QString getVShaderName(uint flags);
QString getGShaderName(uint flags); QString getGShaderName(uint flags);
QString getFShaderName(uint flags); QString getFShaderName(uint flags);
QOpenGLShaderProgram* findOrLoadShader(uint flags); QOpenGLShaderProgram* findOrLoadShader(uint flags);
//! A simple shader preprocessor that can replace #defines //! A simple shader preprocessor that can replace #defines
skipping to change at line 241 skipping to change at line 244
uint flags = INVALID; uint flags = INVALID;
if(globals.openglES) flags|=OGL_ES2; if(globals.openglES) flags|=OGL_ES2;
if(!globals.shadowTransform) if(!globals.shadowTransform)
{ {
flags |= SHADING; flags |= SHADING;
if(globals.pixelLighting) flags|= PIXEL_LIGHTING; if(globals.pixelLighting) flags|= PIXEL_LIGHTING;
if(globals.pixelLighting && globals.shadows) flags|= SHADOWS ; if(globals.pixelLighting && globals.shadows) flags|= SHADOWS ;
if(globals.pixelLighting && globals.shadows && globals.shado wFilterQuality>S3DEnum::SFQ_HARDWARE) flags|= SHADOW_FILTER; if(globals.pixelLighting && globals.shadows && globals.shado wFilterQuality>S3DEnum::SFQ_HARDWARE) flags|= SHADOW_FILTER;
if(globals.pixelLighting && globals.shadows && globals.shado wFilterQuality>S3DEnum::SFQ_LOW_HARDWARE) flags|= SHADOW_FILTER_HQ; if(globals.pixelLighting && globals.shadows && globals.shado wFilterQuality>S3DEnum::SFQ_LOW_HARDWARE) flags|= SHADOW_FILTER_HQ;
if(globals.pixelLighting && globals.shadows && (globals.shad if(globals.pixelLighting && globals.shadows && !globals.hwSh
owFilterQuality == S3DEnum::SFQ_LOW || globals.shadowFilterQuality == S3DEn adowSamplers && (globals.shadowFilterQuality == S3DEnum::SFQ_LOW || globals
um::SFQ_HIGH) && globals.pcss) flags|= PCSS; .shadowFilterQuality == S3DEnum::SFQ_HIGH) && globals.pcss) flags|= PCSS;
if(globals.hwShadowSamplers) flags|=HW_SHADOW_SAMPLERS;
if(globals.geometryShader) flags|= GEOMETRY_SHADER; if(globals.geometryShader) flags|= GEOMETRY_SHADER;
if(globals.torchLight) flags|= TORCH; if(globals.torchLight) flags|= TORCH;
if(globals.frustumSplits == 1) flags|= SINGLE_SHADOW_FRUSTUM ; if(globals.frustumSplits == 1) flags|= SINGLE_SHADOW_FRUSTUM ;
} }
else else
{ {
flags |= TRANSFORM; flags |= TRANSFORM;
} }
if(mat) if(mat)
 End of changes. 3 change blocks. 
3 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/