Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variance Shadow Mapping texture problem #24

Open
deamont66 opened this issue Aug 4, 2014 · 2 comments
Open

Variance Shadow Mapping texture problem #24

deamont66 opened this issue Aug 4, 2014 · 2 comments

Comments

@deamont66
Copy link

Hi Benny, I'm porting your 3DEngine to Java and accidentally bump into issue with texture creation.
In you Variance Shadow Mapping Implementation video you changed shadowMap internal format to GL_RG32F and since then is my rendering broken. The PCF shadow smoothing work just fine, but this is not.

github-shadows-after

The issue started here, after changing this line:

setTexture("shadowMap", new Texture(1024, 1024, null, GL_TEXTURE_2D, GL_NEAREST, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, true, GL_DEPTH_ATTACHMENT));

to line:

setTexture("shadowMap", new Texture(1024, 1024, null, GL_TEXTURE_2D, GL_LINEAR, GL_RG32F, GL_RGBA, true, GL_COLOR_ATTACHMENT0));

Here is my commit of changing code back to PCF shadows:
deamont66/3DEngine@82d9a5a

My code is complete mirror of this commit: https://github.com/BennyQBD/3DEngineCpp/tree/001bc572e85e090df77cd9de2f3cfa61ab3b563a

I don't really know what the issue can be. I have laptop with Intel Integrated Graphic (3.1.0 - Build 9.17.10.3347) and NVidia m555 (4.4.0) on both same result.

P.S.: My code include the fix for depth textures on Intel (glReadBuffer), but changing or removing it doesn't make any effect at all. And sorry for my bad English but it's not my native language.

I will be glad for any help, Thanks.

@BennyQBD
Copy link
Owner

BennyQBD commented Aug 5, 2014

If you download my current version of the repository, build, and run that, does that still have the issue, or does it only happen in your repository?

@deamont66
Copy link
Author

Yeah just tried and it seems working fine. Sorry for interrupting you but problem is probably on my side (or LWJGLs). I cant found any differences in my code and cpp one, Do you have any idea what can cause that issue?
Thanks for fast response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants