PeriDyno 1.0.0
Loading...
Searching...
No Matches
RenderParams.h
Go to the documentation of this file.
1
16
17#pragma once
18
19#include <glm/glm.hpp>
20
21namespace dyno
22{
24 {
25 struct Transform {
26 glm::mat4 model = glm::mat4{ 1.f }; // model transform
27 glm::mat4 view = glm::mat4{ 1.f }; // view transform
28 glm::mat4 proj = glm::mat4{ 1.f }; // projection transform
29 //glm::mat4 normal = glm::mat4{ 1.f }; // normal transform
31
32 struct Light
33 {
34 // ambient light
35 glm::vec3 ambientColor = glm::vec3(0.05f);
36 float ambientScale = 1.f;
37
38 // directional light
39 glm::vec3 mainLightColor = glm::vec3(1.f);
40 float mainLightScale = 5.f;
41 glm::vec3 mainLightDirection = glm::vec3(0.4f, 0.6f, 0.8f);
42 float mainLightShadow = 1.f; // 0 - disable shadow; otherwise enable shadow
43
44 // camera light
45 glm::vec3 cameraLightColor = glm::vec3(0.1f);
46 float cameraLightScale = 1.f;
48
49 // image size
50 int width = 0;
51 int height = 0;
52
53 // index
54 int index = -1;
55
56 // render mode
57 // 0 - Opacity
58 // 1 - Shadow map generation
59 // 2 = Transparency
60 int mode = 0;
61
62 float unitScale = 1.0f;
63 };
64
65}
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
struct dyno::RenderParams::Light light
struct dyno::RenderParams::Transform transforms