PCSS is a C++/OpenGL implementation of the Percentage-Closer Soft Shadows technique.
Developed during my photorealistic rendering PhD course.
Video:
GLSL implementation of the Percentage-Closer Soft Shadows technique
about calculating the filter size, we need to first calculate the estimation:
imo, to calculate the penumbra size, we can do:
penumbraSize = (dReceiver - dBlocker) / dBlocker * lightSize
actually my questions are from your code:
float SearchWidth(float uvLightSize, float receiverDistance)
{
return uvLightSize * (receiverDistance - NEAR) / eyePosition.z;
}
for the search area width, i don't know why you use eyePosition.z
instead of the shadow space z
here, what is the reason? is the eyePosition
the main camera in the scene? could you please elaborate?) (http://developer.download.nvidia.com/whitepapers/2008/PCSS_DirectionalLight_Integration.pdf is not available now...)
also, what is the reason you use NEAR / shadowCoords.z
here?
float penumbraWidth = (shadowCoords.z - blockerDistance) / blockerDistance;
float uvRadius = penumbraWidth * uvLightSize * NEAR / shadowCoords.z;
Thanks!
can you supply a obj file ?. I can't import the obj file exported from the newest blender. can you supply one obj?thx
error message: Run-Time Check Failure #2 - Stack around the variable 'Val' was corrupted.
call stack:
AntTweakBar64.dll!CTwVarAtom::ValueToString(std::string * _Str) 行 510 C++
AntTweakBar64.dll!CTwBar::ListValues(std::vector<std::string,std::allocatorstd::string> & _Values, std::vector<unsigned int,std::allocator> & _Colors, std::vector<unsigned int,std::allocator> & _BgColors, const CTexFont * _Font, int _WidthMax) 行 4109 C++
AntTweakBar64.dll!CTwBar::Update() 行 4575 C++
………………
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.