Skip to content

Image based lighting local probe system - first commit. - #3660

Open
scratchyrice wants to merge 6 commits into
OGRECave:masterfrom
scratchyrice:dynamic-ibl-updates-and-misc-fixes
Open

Image based lighting local probe system - first commit.#3660
scratchyrice wants to merge 6 commits into
OGRECave:masterfrom
scratchyrice:dynamic-ibl-updates-and-misc-fixes

Conversation

@scratchyrice

Copy link
Copy Markdown
Contributor
  • Update to CookTorrance AO.
  • Addition of local probes to IBL SRS (Example will follow when I can - I need to convert my in-engine system over to an ogre example).
  • Addition of local probes to IBL GLSL.

Updated D3D11 Mip map generation flag - will now only automatically generate mipmaps when TU_AUTOMIPMAP is set.
IBL can now accept seperate diffuse and specular textures.
AO Added to PBR pipeline on R channel in MR texture.
- Update to CookTorrance AO.
- Addition of local probes to IBL SRS (Example will follow when I can - I need to convert my in-engine system over to an ogre example).
- Addition of local probes to IBL GLSL.
mShAtlasSizeParam = psProgram->resolveParameter(GpuProgramParameters::ACT_TEXTURE_SIZE, mLocalProbeShAtlasSamplerIndex);

//Local probe 1
mLocalProbeParams1_1 = psProgram->resolveParameter(GCT_FLOAT4, "IBL_LocalProbe_1_1"); //x, y, z = position. w = probe ID for SH atlas reference.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolveParameter(GCT_FLOAT4, GPV_GLOBAL, -1, "IBL_LocalProbe", 12) to make it an vec4 array for easier handling

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. Much cleaner. Didn't know you could do this. Want to extend it to up to 10 probes for large single mesh's - this approach would make it cleaner.

//Compute AO
float visibility = 1.0;
visibility *= computeMicroShadowing(NoL, pixel.ao);
//AO / micro shadowing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rebase on master. I corrected the AO computation there

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, didn't realise. Will do.

float x = n.x, y = n.y, z = n.z;

return
sh0 * 0.2820947918 +

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

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.

2 participants