More sophisticated implementations of percentage closer filtering (PCF) take into account the relative distance between the light

Question:

More sophisticated implementations of percentage closer filtering (PCF) take into account the relative distance between the light and the shadow versus the light and the occluder. Doing this can make soft shadows more realistic, by allowing their penumbra to change in size as the light moves closer or further from the occluder (or as the occluder moves closer or further from the shadow). Study existing methods for incorporating this capability, and add it to Program 8.2.

Program 8.2Fragment Shader #version 430 // all variable declarations are unchanged // Returns the shadow depth value forvoid main(void) { float shadowFactor = 0.0; vec3 L = normalize(vLightDir); vec3 N = normalize(vNormal); vec3shadowFactor += lookup(-1.5*swidth shadowFactor += lookup(0.5*swidth shadowFactor += lookup(0.5*swidth + 

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Graphics Programming In OpenGL With JAVA

ISBN: 9781683922193

2nd Edition

Authors: V. Scott Gordon PhD, John L. Clevenger PhD

Question Posted: