Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
NodeBufferedData.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2018 DIVIDE-Studio
3 Copyright (c) 2009 Ionut Cava
4
5 This file is part of DIVIDE Framework.
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software
9 and associated documentation files (the "Software"), to deal in the Software
10 without restriction,
11 including without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sublicense,
13 and/or sell copies of the Software, and to permit persons to whom the
14 Software is furnished to do so,
15 subject to the following conditions:
16
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
19
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED,
22 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23 PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25 DAMAGES OR OTHER LIABILITY,
26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27 IN CONNECTION WITH THE SOFTWARE
28 OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 */
31
32#pragma once
33#ifndef DVD_RENDER_PASS_NODE_BUFFERED_DATA_H_
34#define DVD_RENDER_PASS_NODE_BUFFERED_DATA_H_
35
36namespace Divide {
37
38#pragma pack(push, 1)
40 {
43 //[0][0]...[2][2] - normalMatrix
44 //[0][3] = 4x8U: unused, unused, LoDLevel, occlusion cull
45 //[1][3] = animationFrame
46 //[2][3] = boneCount
47 //[3][0..3] = boundingSphere
49 };
50
52 {
53 //base colour
55 //rgb - emissive
56 //a - parallax factor
58 //rgb - ambientColour (Don't really need this. To remove eventually, but since we have the space, might as well)
59 //a - specular strength [0...Material::MAX_SHININESS]. Used mainly by Phong shading
61 //x = 4x8U: occlusion, metallic, roughness, isDoubleSided
62 //y = 4x8U: specular.r, specular.g, specular.b, use packed OMR
63 //z = 4x8U: bump method, shadingMode, reserved, reserved
64 //w = Probe lookup index + 1 (0 = sky cubemap)
66 //x = 4x8U: tex op Unit0, tex op Unit1, tex op Specular, Emissive
67 //y = 4x8U: tex op Occlusion, tex op Metalness, tex op Roughness, tex op Opcaity
68 //z = 4x8U: use albedo texture alpha channel, use opacity map alpha channel, specular Factor, gloss Factor
69 //w = 4x8u: receives shadows, reserved, reserved, reserved
71 };
72
73 [[nodiscard]] size_t HashMaterialData(const NodeMaterialData& dataIn);
74#pragma pack(pop)
75
76} //namespace Divide
77
78#endif //DVD_RENDER_PASS_NODE_BUFFERED_DATA_H_
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
size_t HashMaterialData(const NodeMaterialData &dataIn)
static const mat4< F32 > MAT4_INITIAL_TRANSFORM
Definition: MathMatrices.h:744
static const mat4< F32 > MAT4_IDENTITY
Definition: MathMatrices.h:740