4 #include "renderpass.h"
75 TextureChannel *depthMapIn, *normalMapIn, *colorMapIn, *shadedImageOut;
77 static GLuint vertexShader, fragmentShader, shaderProgram,
78 loc_depthMap, loc_colorTex, loc_normalTex, loc_invProj, loc_shininess, loc_ambient,
79 loc_lightPos, loc_lightCol, loc_lightIntens, loc_lightCount;
80 static QMatrix4x4 *vMat, *invProjMat;
82 static unsigned char instanceCounter;
88 static bool initShaders();
89 static void cleanupShaders();
92 #endif // SHADINGPASS_H
void setDepthMapInput(TextureChannel &textureChannel)
Sets the depth map that shall be used during rendering.
Definition: shadingpass.cpp:34
A Render Pass that performs deferred shading.
Definition: shadingpass.h:13
void removeInput() override
Removes all input channels except for VaoChannels. If the Render Pass uses VaoChannels as input use t...
Definition: shadingpass.cpp:68
void updateResolution() override
Must be called after the screen resolution has changed.
Definition: shadingpass.cpp:117
bool shadedImageToScreen()
Changes the output mode. The shaded image is now drawn onto the screen.
Definition: shadingpass.cpp:61
void cleanup() override
Resets the Render Pass to the state after creation but before initialization.
Definition: shadingpass.cpp:27
static void linkVMat(QMatrix4x4 &v)
Links the view matrix that shall be used during rendering.
Definition: shadingpass.cpp:130
An abstract class for Render Passes.
Definition: renderpass.h:26
This channel is used to link textures or data maps.
Definition: renderpass.h:210
void setColorMapInput(TextureChannel &textureChannel)
Sets the color map that shall be used during rendering.
Definition: shadingpass.cpp:41
void setNormalMapInput(TextureChannel &textureChannel)
Sets the normal map that shall be used during rendering.
Definition: shadingpass.cpp:48
static void linkInvProjMat(QMatrix4x4 &ip)
Links the inverse projection matrix that shall be used during rendering.
Definition: shadingpass.cpp:134
TextureChannel & getShadedOutput()
Returns the shaded image.
Definition: shadingpass.cpp:55
void render() override
Uses the input data to generate the output.
Definition: shadingpass.cpp:203