Skip to content

Commit

Permalink
Fix heading ids
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Apr 26, 2024
1 parent 68cbc3c commit 69f44ac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions blog/2015-04-20-the-making-of-seemore-webgl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand All @@ -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/)

Expand All @@ -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:

Expand All @@ -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)

Expand Down

0 comments on commit 69f44ac

Please sign in to comment.