tobspr / RenderPipeline

Physically Based Shading and Deferred Rendering for the Panda3D game engine
https://github.com/tobspr/RenderPipeline/wiki
Other
962 stars 132 forks source link

Working GI sample #9

Closed cedricp closed 10 years ago

cedricp commented 10 years ago

Hi,

Would it be possible to have a working GI sample scene ? Some sample files are not included in the repo.

Thank you.

rdb commented 10 years ago

I don't speak for tobspr, but I might be of some help. I hosted the missing sample files here: http://rdb.name/tobspr_renderpipeline_demoscene.7z

You will also need a patch for the GI to work on non-NVIDIA cards, tobspr hasn't committed it yet: http://rdb.name/tobspr_renderpipeline_gi_patch.diff

cedricp commented 10 years ago

Thank you for that ! But it seems that it isn't working. I have enabled global illum in the .ini file, but I always have a white screen when I isolate the GI pass... Another problem, but it's just a warning : :display:gsg:glgsg(warning): Program undefined behavior warning: Sampler object 0 has depth compare enabled. It is being used with depth texture 26, by a program that samples it with a regular sampler. This is undefined beahvior.

cedricp commented 10 years ago

NB: it's an NVIDIA Quadro K2000 card with the latest drivers...

rdb commented 10 years ago

GI has to be enabled first in Config/pipeline.ini, and you need my shader fixes. Did you apply the patch that I linked?

cedricp commented 10 years ago

No, as you mentionned that it's for non-Nvidia cards

rdb commented 10 years ago

It may apply to NVIDIA cards as well, and it certainly doesn't hurt to apply it. In any case, even without the patch, you still have to enable GI explicitly in pipeline.ini.

2014-09-10 14:10 GMT+02:00 cedricp notifications@github.com:

No, as you mentionned that it's for non-Nvidia cards

— Reply to this email directly or view it on GitHub https://github.com/tobspr/RenderPipeline/issues/9#issuecomment-55105981.

cedricp commented 10 years ago

I've applied the patch, it's the same, if I disable/enable GI, only the bottom of the curtains are affected

cedricp commented 10 years ago

enableGlobalIllumination is already set to True by the way in pipeline.ini

tobspr commented 10 years ago

Hey, I will commit a patch for the global illumination soon, however, your issue seems to be that you enabled useHardwarePCF, which enables depth filtering. With that enabled, a depth texture cannot be sampled in a normal way, thus the GI does not work properly. Try disabling the PCF, and see if it works then. I'm working on a fix for that!

Btw, thank you rdb for hosting the files :+1: I'll think of a way to include them in the repo

tobspr commented 10 years ago

I've committed a fix, including rdb's patch, lemme know if it works for you!