Code Monkey home page Code Monkey logo

pcss's Introduction

PCSS

PCSS is a C++/OpenGL implementation of the Percentage-Closer Soft Shadows technique.

Developed during my photorealistic rendering PhD course.


Video:

ScreenShot

pcss's People

Contributors

pboechat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pcss's Issues

Filter size

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 ?

can you supply a obj file ?. I can't import the obj file exported from the newest blender. can you supply one obj?thx

something wrong with lib antweakbar in vs2022

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++
………………

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.