INormalShader class

<oceansdk/normalshaderplugin.h>

Description

This interface class allows calling a Normal shader

In the SDK, you will either:

  • Use this class directly to call a child normal shader

  • Use the derived class INormalShaderPlugin to create a plugin normal shader

Namespace

This class is in the namespace Ocean::Sdk

Inherited by

INormalShaderPlugin

Members

class INormalShader : public INode
::Vec3<float> valueTS(const IShaderContext *sc) const

[virtual]

Returns the shaded normal vector in the original surface tangent space for the given shader context sc.

Parameters

sc – The shading context for this shader evaluation

::Vec3<float> shadeWS(const IShaderContext *sc, const ::Vec3<float> &normalWS) const

[virtual]

Transforms a given world space normal vector.

This normal shading operation is done in addition to the one performed by shadeWS().

It is useful for modelling normal perturbations not easy to describe using shadeWS(), such as slight panel tilts over a building surface.

Parameters
  • sc – The shading context for this shader evaluation

  • normalWS – The original world space normal vector