File ShaderVariables.cs
File List > Render > src > ShaderVariables.cs
Go to the documentation of this file.
using System.Collections.Generic;
using Qkmaxware.Geometry;
namespace Qkmaxware.Rendering {
public struct ShaderVariables {
// Transformations
public Transformation ModelToWorld; // Assigned when model is chosen for rendering
public Transformation WorldToModel => ModelToWorld.Inverse;
public Vec3 WorldPosition; // Assigned when pixel is drawn
public Vec3 WorldNormal; // Assigned when triangle is chosen for rendering
// Camera & Screen
public Vec3 WorldCameraPosition; // Assigned when camera is selected for rendering
public Vec3 ScreenPixel; // Assigned when coordinate is projected to the screen
// Texturing
public Vec2 UVCoordinates; // Assigned when coordinate is projected to the screen
// Lighting
public IEnumerable<LightSource> LightSources; // Assigned when camera is selected for rendering
}
}