September 2018
Intermediate to advanced
472 pages
15h 36m
English
To create a shader program that generates a night-vision effect, perform the following steps:
in vec3 Position; in vec3 Normal; in vec2 TexCoord; uniform int Width; uniform int Height; uniform float Radius; layout(binding=0) uniform sampler2D RenderTex; layout(binding=1) uniform sampler2D NoiseTex; subroutine vec4 RenderPassType(); subroutine uniform RenderPassType RenderPass; // Define any uniforms needed for the shading model. layout( location = 0 ) out vec4 FragColor; vec3 phongModel( vec3 pos, vec3 norm ) { // Compute the ...Read now
Unlock full access