|
Blobalizer
|
A class representing the shader responsible for the ray marching of the application. More...
#include <RayMarchingShader.h>
Public Member Functions | |
| RayMarchingShader () | |
| Loads the shader files from disk, then compiles and links them. | |
| void | bindSdf (GL::Texture3D &texture) |
| Bind the given sdf texture to the shader. | |
| void | bindStructure (GL::Texture2D &texture) |
| Bind the given structure texture to the shader. | |
| void | bindStructurePos (GL::Texture2D &texture) |
| Bind the given structure positions texture to the shader. | |
| void | bindStructureMask (GL::Texture2D &texture) |
| Bind the given structure mask texture to the shader. | |
| void | setViewportSize (const Vector2ui &viewportSize) |
| Update the viewport size uniform of this shader. | |
| void | setProjectionMatrix (const Matrix4 &matrix) |
| Update the projection matrix uniform of this shader. | |
| void | setViewMatrix (const Matrix4 &matrix) |
| Update the view matrix uniform of this shader. | |
| void | setCameraPosition (const Vector3 &position) |
| Update the camera position uniform of this shader. | |
| void | setSdfSize (const Vector3 &size) |
| Set the size of the sdf grid in object space. | |
| void | setSurfaceRenderingMode (const UnsignedInt &mode) |
| Set the surface rendering mode uniform. This decides how the surface is rendered. | |
| void | setDisplayMode (const UnsignedInt &mode) |
| Set the display mode uniform. This decides whether to render the structure, the surface, or both combined. | |
| void | setDmax (const float dmax) |
| Set the attenuation distance uniform. This is used for attenuating the inner structure based on distance from the surface. | |
| void | setSSS (const bool SSS) |
| Set the subsurface scattering uniform. This is used to determine whether to render the subsurface scattering of the surface. | |
| void | setSSSMode (const UnsignedInt &mode) |
| Set the subsurface scattering mode uniform. This is used to determine how to render the subsurface scattering of the surface. | |
| void | setReflectionCount (const UnsignedInt &reflectionCount) |
| Set the reflection count uniform. This decides how many times the ray is reflected. | |
| void | setSurfaceColor (const Color3 &color) |
| Set the surface color uniform. This decides in which color to render the surface. | |
| void | setSubSurfaceColor (const Color3 &color) |
| Set the subsurface color uniform. This decides in which color to render the subsurface scattering effect. | |
| void | setSubSurfaceStrength (const float strength) |
| Set the subsurface strength uniform. This is used for determining how strong the subsurface scattering effect is. | |
Private Types | |
| enum | : Int { SDFTextureUnit = 0 , StructureTextureUnit = 1 , StructurePosTextureUnit = 2 , StructureMaskTextureUnit = 3 } |
Private Attributes | |
| Int | viewportSizeUniform |
| Int | viewMatrixUniform |
| Int | projectionMatrixUniform |
| Int | cameraPositionUniform |
| Int | sdfSizeUniform |
| Int | surfaceRenderingModeUniform |
| Int | displayModeUniform |
| Int | dmaxUniform |
| Int | SSSUniform |
| Int | SSSModeUniform |
| Int | reflectionCountUniform |
| Int | surfaceColorUniform |
| Int | subSurfaceColorUniform |
| Int | subSurfaceStrengthUniform |
A class representing the shader responsible for the ray marching of the application.
|
private |
|
inline |
Loads the shader files from disk, then compiles and links them.
|
inline |
Bind the given sdf texture to the shader.
| texture | a 3d texture containing a signed-distance field grid of the object to render. |
|
inline |
Bind the given structure texture to the shader.
| texture | a 2d texture containing the rasterized render of the molecular structure. |
|
inline |
Bind the given structure mask texture to the shader.
| texture | a 2d texture containing the mask of the molecular structure. |
|
inline |
Bind the given structure positions texture to the shader.
| texture | a 2d texture containing the rasterized fragment positions texture of the molecular structure. |
|
inline |
Update the camera position uniform of this shader.
| matrix | the new vcamera position |
|
inline |
Set the display mode uniform. This decides whether to render the structure, the surface, or both combined.
| mode | the new display mode |
|
inline |
Set the attenuation distance uniform. This is used for attenuating the inner structure based on distance from the surface.
| dmax | the new attenuation distance |
|
inline |
Update the projection matrix uniform of this shader.
| matrix | the new projection matrix |
|
inline |
Set the reflection count uniform. This decides how many times the ray is reflected.
| reflectionCount | the new reflection count |
|
inline |
Set the size of the sdf grid in object space.
| size | the size of the sdf grid in object space. |
|
inline |
Set the subsurface scattering uniform. This is used to determine whether to render the subsurface scattering of the surface.
| SSS | the new subsurface scattering value |
|
inline |
Set the subsurface scattering mode uniform. This is used to determine how to render the subsurface scattering of the surface.
| mode | the new subsurface scattering mode |
|
inline |
Set the subsurface color uniform. This decides in which color to render the subsurface scattering effect.
| color | the new subsurface color |
|
inline |
Set the subsurface strength uniform. This is used for determining how strong the subsurface scattering effect is.
| strength | the new subsurface strength |
|
inline |
Set the surface color uniform. This decides in which color to render the surface.
| color | the new surface color |
|
inline |
Set the surface rendering mode uniform. This decides how the surface is rendered.
| mode | the new surface rendering mode |
|
inline |
Update the view matrix uniform of this shader.
| matrix | the new view matrix |
|
inline |
Update the viewport size uniform of this shader.
| viewportSize | the new viewport size |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |