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

Physically based rendering #640

Merged
merged 6 commits into from Jul 6, 2016

Conversation

SamuelCho
Copy link
Contributor

@SamuelCho SamuelCho commented Jul 6, 2016

Introduces physically-based Blinn-Phong Fresnel lighting, roughness map support, high dynamic range tonemapping, and better bloom.

@The-E The-E merged commit 7516ce0 into scp-fs2open:master Jul 6, 2016
@chief1983
Copy link
Member

Guessing the Mac issues with this won't be sorted until we move to Core?

@SamuelCho
Copy link
Contributor Author

I'll take a look at PBR in Mac to see if I can immediately address anything.

@chief1983
Copy link
Member

chief1983 commented Jul 6, 2016

Well, if it helps, the first issue I saw on my machine (Radeon HD 6750M) was in the tech room, mediaVPs, looking at the Ulysses. There was a line through the middle of the ship viewing area, and below the line was shader darker than above the line. The cockpit wasn't rendering correctly either. Didn't get much farther than that. I can get some logs from various builds if it would help.

@SamuelCho
Copy link
Contributor Author

Shadows probably aren't working. Try disabling shadows and see if that line disappears.

@chief1983
Copy link
Member

Got rid of that line and shading, but the Ulysses still looks a bit odd, with a white translucent cockpit and some gray stripes instead of the usual blue-ish cockpit in 3.7.4. Also, many other ships are rendering completely white in the tech room, such as the Hercules (except for glowpoints). Log attached.
fs2_open.log.txt

@asarium
Copy link
Member

asarium commented Jul 6, 2016

ERROR: 0:395: Invalid call of undeclared identifier 'textureCubeLod'
ERROR: 0:399: Use of undeclared identifier 'envColour'
ERROR: 0:400: Use of undeclared identifier 'envColour'

The shader fails to compile so visual artifacts are likely. Also, OpenGL Version : 2.1 ATI-1.42.11. That's a very old OpenGL version so I guess it's missing quite a few required OpenGL extensions.

@chief1983
Copy link
Member

Well, it's a bit older so I'm not surprised. But perhaps we should be looking at making sure individual graphics features disable themselves more gracefully when they aren't available? After toggling some things in the F3 lab, I narrowed it down to the specular maps that seem to be causing the issues I see now. The Ulysses, Hercules, etc go back to mostly normal without that channel enabled. If I enable -nospec and don't enable shadows the tech room ships all render pretty much OK.

@SamuelCho
Copy link
Contributor Author

SamuelCho commented Jul 6, 2016

I didn't have a Mac during the time when I was working on the physically-based lighting code so I admit that I shortsightedly didn't test this code as soon as I got my Mac machine a couple weeks ago. I'll probably smoke out the compilation issues on my new machine when I get home tonight.

Though my hypothesis is that the cube map look ups don't support differing MIP levels on Mac.

@SamuelCho
Copy link
Contributor Author

SamuelCho commented Jul 7, 2016

My hunch was correct. It involved an extension that wasn't enabled. #642

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

Successfully merging this pull request may close these issues.

None yet

4 participants