Class GpuSkinning
Lighting knobs on the shared GPU-skinning shader. Defaults are unlit (white ambient, sun off) so games that never call this look exactly as they did.
Inherited Members
Namespace: PopcorningGuineaPig.Engine.Gameplay
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public static class GpuSkinning
Properties
| Edit this page View SourceCompileFailure
Set when the skinning shader failed to compile. Null when it linked or has not been compiled yet. Callers must not draw the rigged mesh in that case.
Declaration
public static string? CompileFailure { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceSetFog(ReadOnlySpan<Vector2>, float, float, Vector3)
XZ distance fog to living sight centres. Empty centers
(or never calling this) keeps the unlit/unfogged default. Count is clamped 0..10.
Declaration
public static void SetFog(ReadOnlySpan<Vector2> centers, float start, float end, Vector3 color)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<Vector2> | centers | |
| float | start | |
| float | end | |
| Vector3 | color |
SetHemisphereSun(Vector3, Vector3, Vector3, Vector3, float)
Hemisphere ambient + one directional sun, half-lambert. sunDir
points toward the sun. Pass sunStrength 0 and both ambients
as One to restore the unlit default.
Declaration
public static void SetHemisphereSun(Vector3 sunDir, Vector3 sunColor, Vector3 skyAmbient, Vector3 groundAmbient, float sunStrength)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | sunDir | |
| Vector3 | sunColor | |
| Vector3 | skyAmbient | |
| Vector3 | groundAmbient | |
| float | sunStrength |