From 69f44ac99649acd53295efdd848ffcf5a21198fb Mon Sep 17 00:00:00 2001 From: Will Eastcott Date: Fri, 26 Apr 2024 23:05:44 +0100 Subject: [PATCH] Fix heading ids --- blog/2015-04-20-the-making-of-seemore-webgl.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/blog/2015-04-20-the-making-of-seemore-webgl.md b/blog/2015-04-20-the-making-of-seemore-webgl.md index 2f2d66323..07f96f458 100644 --- a/blog/2015-04-20-the-making-of-seemore-webgl.md +++ b/blog/2015-04-20-the-making-of-seemore-webgl.md @@ -24,15 +24,15 @@ This is the generation and usage of prefiltered cubemaps. Each mipmap level stor [![prefilter](/img/prefilter.jpg)](/img/prefilter.jpg) -#### How did we do it? +#### How We Did It {#how-we-did-it-1} First, we added a cubemap filtering utility to the engine (GPU-based importance sampling). The next step was to expose this functionality in the PlayCanvas Editor. This technique uses Phong lobes of different sizes to pre-blur each mip level. Runtime shaders use either the EXT_shader_texture_lod extension (where supported) or reference mip levels stored as individual textures that are interpolated manually. -#### Show me the code! +#### Source Code {#source-code-1} [https://github.com/playcanvas/engine/pull/202](https://github.com/playcanvas/engine/pull/202) -#### Further reading: +#### Further Reading {#further-reading-1} - [https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-20-gpu-based-importance-sampling](https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-20-gpu-based-importance-sampling) - [https://seblagarde.wordpress.com/2012/06/10/amd-cubemapgen-for-physically-based-rendering/](https://seblagarde.wordpress.com/2012/06/10/amd-cubemapgen-for-physically-based-rendering/) @@ -43,15 +43,15 @@ This feature makes cubemaps work as if projected onto the insides of a box, inst [![bpcem34](/img/bpcem34.jpg)](/img/bpcem34.jpg) -#### How did we do it? +#### How We Did It {#how-we-did-it-2} This effect is implemented using a world-space AABB projection. Refraction uses the same code as reflection but with a different ray direction, so the projection automatically applies to it as well. -#### Show me the code! +#### Source Code {#source-code-2} [https://github.com/playcanvas/engine/pull/183](https://github.com/playcanvas/engine/pull/183) -#### Further reading: +#### Further Reading {#further-reading-2} - [https://www.gamedev.net/forums/topic/568829-box-projected-cubemap-environment-mapping/](https://www.gamedev.net/forums/topic/568829-box-projected-cubemap-environment-mapping/) @@ -67,7 +67,7 @@ This feature was required in Seemore to achieve the following: [![fol](/img/seemore-foliage.jpg)](/img/seemore-foliage.jpg) - **Plant/tentacle animation.** Procedural code that drives vertex positions/normals/tangents. -#### How did we do it? +#### How We Did It {#how-we-did-it-3} Shader chunks are stored in the engine sourcebase as .vert and .frag files that contain snippets of GLSL. You can find all of these files [here](https://github.com/playcanvas/engine/tree/main/src/scene/shader-lib/chunks). Here’s an example chunk that applies exponential squared fog to a fragment: @@ -89,7 +89,7 @@ Each chunk file’s name becomes its name at runtime, with PS or VS appended, de material.chunks.fogExp2PS = myCustomShaderString; ``` -#### Show me the code! +#### Source Code {#source-code-3} [https://github.com/playcanvas/engine/pull/172](https://github.com/playcanvas/engine/pull/172)