collada/header: add lights
This also automates the collada header/buffer build process.
This commit is contained in:
parent
683115e0c1
commit
4d952b0a90
20
Makefile
20
Makefile
@ -50,11 +50,10 @@ SHADERS = \
|
|||||||
$(BUILD_TYPE)/effect/collada.fxo \
|
$(BUILD_TYPE)/effect/collada.fxo \
|
||||||
$(BUILD_TYPE)/effect/collada_scene.fxo
|
$(BUILD_TYPE)/effect/collada_scene.fxo
|
||||||
|
|
||||||
BUFFERS = \
|
SCENES = \
|
||||||
models/curve_interpolation/curve_interpolation.vtx \
|
src/scenes/curve_interpolation/curve_interpolation.cpp
|
||||||
models/curve_interpolation/curve_interpolation.idx
|
|
||||||
|
|
||||||
$(BUILD_TYPE)/%.res: %.rc $(SHADERS) $(BUFFERS)
|
$(BUILD_TYPE)/%.res: %.rc $(SHADERS) $(SCENES)
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(WINDRES) -O coff -I$(BUILD_TYPE)/effect -o $@ $<
|
$(WINDRES) -O coff -I$(BUILD_TYPE)/effect -o $@ $<
|
||||||
|
|
||||||
@ -62,6 +61,17 @@ $(BUILD_TYPE)/%.obj: src/%.cpp
|
|||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CXX) $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(WOPT) $(OPT) -o $@ -c $<
|
$(CXX) $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(WOPT) $(OPT) -o $@ -c $<
|
||||||
|
|
||||||
|
COLLADA_PY_SOURCE = \
|
||||||
|
$(wildcard collada/*.py)
|
||||||
|
|
||||||
|
include/scenes/%.hpp: $(COLLADA_PY_SOURCE)
|
||||||
|
@mkdir -p $(@D)
|
||||||
|
PYTHONPATH=. python -m collada.main $@
|
||||||
|
|
||||||
|
src/scenes/%.cpp: scenes/%.DAE include/scenes/%.hpp
|
||||||
|
@mkdir -p $(@D)
|
||||||
|
PYTHONPATH=. python -m collada.main $< $@ $(<:.DAE=.vtx) $(<:.DAE=.idx)
|
||||||
|
|
||||||
OBJS = \
|
OBJS = \
|
||||||
$(BUILD_TYPE)/main.res \
|
$(BUILD_TYPE)/main.res \
|
||||||
$(BUILD_TYPE)/robot_player.obj \
|
$(BUILD_TYPE)/robot_player.obj \
|
||||||
@ -72,7 +82,7 @@ OBJS = \
|
|||||||
$(BUILD_TYPE)/input.obj \
|
$(BUILD_TYPE)/input.obj \
|
||||||
$(BUILD_TYPE)/collada.obj \
|
$(BUILD_TYPE)/collada.obj \
|
||||||
$(BUILD_TYPE)/collada_scene.obj \
|
$(BUILD_TYPE)/collada_scene.obj \
|
||||||
$(BUILD_TYPE)/scenes/curve_interpolation.obj
|
$(BUILD_TYPE)/scenes/curve_interpolation/curve_interpolation.obj
|
||||||
|
|
||||||
$(BUILD_TYPE)/d3d10.exe: $(OBJS)
|
$(BUILD_TYPE)/d3d10.exe: $(OBJS)
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
|
|||||||
@ -310,12 +310,23 @@ def render_node_channels(state, collada, node, node_name):
|
|||||||
yield f"&node_channel_{target_name},"
|
yield f"&node_channel_{target_name},"
|
||||||
yield "};"
|
yield "};"
|
||||||
|
|
||||||
|
def render_node_instance_lights(state, collada, node_name, instance_lights):
|
||||||
|
yield f"instance_light const instance_lights_{node_name}[] = {{"
|
||||||
|
for instance_light in instance_lights:
|
||||||
|
light = collada.lookup(instance_light.url, types.Light)
|
||||||
|
light_name = sanitize_name(state, light.id, light)
|
||||||
|
yield "{"
|
||||||
|
yield f".light = &light_{light_name},"
|
||||||
|
yield "}"
|
||||||
|
yield "};"
|
||||||
|
|
||||||
def render_node(state, collada, node, node_index):
|
def render_node(state, collada, node, node_index):
|
||||||
node_name_id = get_node_name_id(node)
|
node_name_id = get_node_name_id(node)
|
||||||
node_name = sanitize_name(state, node_name_id, node)
|
node_name = sanitize_name(state, node_name_id, node)
|
||||||
#yield from render_node_children(state, collada, node_name, node.nodes)
|
#yield from render_node_children(state, collada, node_name, node.nodes)
|
||||||
yield from render_node_transforms(state, collada, node_name, node.transformation_elements)
|
yield from render_node_transforms(state, collada, node_name, node.transformation_elements)
|
||||||
yield from render_node_instance_geometries(state, collada, node_name, node.instance_geometries)
|
yield from render_node_instance_geometries(state, collada, node_name, node.instance_geometries)
|
||||||
|
yield from render_node_instance_lights(state, collada, node_name, node.instance_lights)
|
||||||
yield from render_node_channels(state, collada, node, node_name)
|
yield from render_node_channels(state, collada, node, node_name)
|
||||||
|
|
||||||
type = {
|
type = {
|
||||||
@ -334,6 +345,9 @@ def render_node(state, collada, node, node_index):
|
|||||||
yield f".instance_geometries = instance_geometries_{node_name},"
|
yield f".instance_geometries = instance_geometries_{node_name},"
|
||||||
yield f".instance_geometries_count = {len(node.instance_geometries)},"
|
yield f".instance_geometries_count = {len(node.instance_geometries)},"
|
||||||
yield ""
|
yield ""
|
||||||
|
yield f".instance_lights = instance_lights_{node_name},"
|
||||||
|
yield f".instance_lights_count = {len(node.instance_lights)},"
|
||||||
|
yield ""
|
||||||
yield f".channels = node_channels_{node_name},"
|
yield f".channels = node_channels_{node_name},"
|
||||||
yield f".channels_count = {len(state.node_animation_channels[node.id])},"
|
yield f".channels_count = {len(state.node_animation_channels[node.id])},"
|
||||||
#yield ""
|
#yield ""
|
||||||
@ -392,9 +406,7 @@ def render_opt_float(field_name, f):
|
|||||||
f = types.Float(value=0.0)
|
f = types.Float(value=0.0)
|
||||||
yield f".{field_name} = {float(f.value)}f,"
|
yield f".{field_name} = {float(f.value)}f,"
|
||||||
|
|
||||||
def render_library_effects(state, collada):
|
def render_effect(state, collada, effect):
|
||||||
for library_effects in collada.library_effects:
|
|
||||||
for effect in library_effects.effects:
|
|
||||||
profile_common, = effect.profile_common
|
profile_common, = effect.profile_common
|
||||||
assert profile_common.newparam == []
|
assert profile_common.newparam == []
|
||||||
shader = profile_common.technique.shader
|
shader = profile_common.technique.shader
|
||||||
@ -456,6 +468,11 @@ def render_library_effects(state, collada):
|
|||||||
|
|
||||||
yield "};"
|
yield "};"
|
||||||
|
|
||||||
|
def render_library_effects(state, collada):
|
||||||
|
for library_effects in collada.library_effects:
|
||||||
|
for effect in library_effects.effects:
|
||||||
|
yield from render_effect(state, collada, effect)
|
||||||
|
|
||||||
def render_library_materials(state, collada):
|
def render_library_materials(state, collada):
|
||||||
for library_materials in collada.library_materials:
|
for library_materials in collada.library_materials:
|
||||||
for material in library_materials.materials:
|
for material in library_materials.materials:
|
||||||
@ -655,10 +672,34 @@ def render_library_animations(state, collada):
|
|||||||
yield from render_animation(state, collada, animation_name, animation)
|
yield from render_animation(state, collada, animation_name, animation)
|
||||||
animation_ix += 1
|
animation_ix += 1
|
||||||
|
|
||||||
|
def render_light_type(technique_common: types.TechniqueCommon_Light):
|
||||||
|
return {
|
||||||
|
types.Ambient: "AMBIENT",
|
||||||
|
types.Directional: "DIRECTIONAL",
|
||||||
|
types.Point: "POINT",
|
||||||
|
types.Spot: "SPOT",
|
||||||
|
}[type(technique_common.light)]
|
||||||
|
|
||||||
|
def render_light(state, collada, light):
|
||||||
|
technique_common = light.technique_common
|
||||||
|
light_name = sanitize_name(state, light.id, light)
|
||||||
|
color = ", ".join(f"{float(f)}f" for f in technique_common.light.color)
|
||||||
|
light_type = render_light_type(technique_common)
|
||||||
|
yield f"light const light_{light_name} = {{"
|
||||||
|
yield f".type = light_type::{light_type},"
|
||||||
|
yield f".color = {{ {color} }},"
|
||||||
|
yield "};"
|
||||||
|
|
||||||
|
def render_library_lights(state, collada):
|
||||||
|
for library_lights in collada.library_lights:
|
||||||
|
for light in library_lights.lights:
|
||||||
|
yield from render_light(state, collada, light)
|
||||||
|
|
||||||
def render_all(collada, namespace):
|
def render_all(collada, namespace):
|
||||||
state = State()
|
state = State()
|
||||||
render, out = renderer()
|
render, out = renderer()
|
||||||
render(render_header(namespace))
|
render(render_header(namespace))
|
||||||
|
render(render_library_lights(state, collada))
|
||||||
render(render_library_animations(state, collada))
|
render(render_library_animations(state, collada))
|
||||||
render(render_library_effects(state, collada))
|
render(render_library_effects(state, collada))
|
||||||
render(render_library_materials(state, collada))
|
render(render_library_materials(state, collada))
|
||||||
|
|||||||
@ -6,44 +6,61 @@ from collada import header
|
|||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
name = sys.argv[0]
|
name = sys.argv[0]
|
||||||
print("usage:")
|
print("usage (source):")
|
||||||
print(f" {name} [input_collada.dae] [output_source.cpp] [output_header.hpp] [output_vertex.vtx] [output_vertex.idx]")
|
print(f" {name} [input_collada.dae] [output_source.cpp] [output_vertex.vtx] [output_vertex.idx]")
|
||||||
|
print("usage (header):")
|
||||||
|
print(f" {name} [output_header.hpp]")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
def parse_namespace(filename):
|
||||||
|
namespace = path.splitext(path.split(filename)[1])[0]
|
||||||
|
return namespace
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
try:
|
try:
|
||||||
input_collada = sys.argv[1]
|
input_collada = sys.argv[1]
|
||||||
output_source = sys.argv[2]
|
output_source = sys.argv[2]
|
||||||
output_header = sys.argv[3]
|
output_vertex = sys.argv[3]
|
||||||
output_vertex = sys.argv[4]
|
output_index = sys.argv[4]
|
||||||
output_index = sys.argv[5]
|
|
||||||
assert input_collada.lower().endswith(".dae")
|
assert input_collada.lower().endswith(".dae")
|
||||||
assert output_header.lower().endswith(".hpp")
|
assert output_source.lower().endswith(".cpp")
|
||||||
assert output_vertex.lower().endswith(".vtx")
|
assert output_vertex.lower().endswith(".vtx")
|
||||||
assert output_index.lower().endswith(".idx")
|
assert output_index.lower().endswith(".idx")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
usage()
|
usage()
|
||||||
|
|
||||||
collada = parse.parse_collada_file(input_collada)
|
collada = parse.parse_collada_file(input_collada)
|
||||||
namespace = path.splitext(path.split(input_collada)[1])[0]
|
namespace = parse_namespace(input_collada)
|
||||||
state, out_source = header.render_all(collada, namespace)
|
state, out_source = header.render_all(collada, namespace)
|
||||||
out_header = header.render_all_hpp(namespace)
|
|
||||||
|
|
||||||
with open(output_source, 'wb') as f:
|
with open(output_source, 'wb') as f:
|
||||||
source_buf = out_source.getvalue()
|
source_buf = out_source.getvalue()
|
||||||
assert "\r\n" in source_buf
|
assert "\r\n" in source_buf
|
||||||
f.write(source_buf.encode('utf-8'))
|
f.write(source_buf.encode('utf-8'))
|
||||||
|
|
||||||
with open(output_header, 'wb') as f:
|
|
||||||
header_buf = out_header.getvalue()
|
|
||||||
assert "\r\n" in header_buf
|
|
||||||
f.write(header_buf.encode('utf-8'))
|
|
||||||
|
|
||||||
with open(output_vertex, 'wb') as f:
|
with open(output_vertex, 'wb') as f:
|
||||||
f.write(state.vertex_buffer.getvalue())
|
f.write(state.vertex_buffer.getvalue())
|
||||||
|
|
||||||
with open(output_index, 'wb') as f:
|
with open(output_index, 'wb') as f:
|
||||||
f.write(state.index_buffer.getvalue())
|
f.write(state.index_buffer.getvalue())
|
||||||
|
|
||||||
|
def main_header():
|
||||||
|
try:
|
||||||
|
output_header = sys.argv[1]
|
||||||
|
assert output_header.lower().endswith(".hpp")
|
||||||
|
except Exception as e:
|
||||||
|
usage()
|
||||||
|
|
||||||
|
namespace = parse_namespace(output_header)
|
||||||
|
out_header = header.render_all_hpp(namespace)
|
||||||
|
|
||||||
|
with open(output_header, 'wb') as f:
|
||||||
|
header_buf = out_header.getvalue()
|
||||||
|
assert "\r\n" in header_buf
|
||||||
|
f.write(header_buf.encode('utf-8'))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
if len(sys.argv) == 2:
|
||||||
|
main_header()
|
||||||
|
else:
|
||||||
main()
|
main()
|
||||||
|
|||||||
@ -37,20 +37,33 @@ namespace collada_scene {
|
|||||||
|
|
||||||
node_instance * m_nodeInstances = NULL;
|
node_instance * m_nodeInstances = NULL;
|
||||||
|
|
||||||
|
XMFLOAT4 * m_lightPositions = NULL;
|
||||||
|
XMFLOAT4 * m_lightDirections = NULL;
|
||||||
|
XMFLOAT4 * m_lightColors = NULL;
|
||||||
|
|
||||||
|
int m_lightInstancesCount = 0;
|
||||||
|
|
||||||
collada::descriptor const * m_descriptor;
|
collada::descriptor const * m_descriptor;
|
||||||
|
|
||||||
HRESULT load_scene(collada::descriptor const * const descriptor);
|
HRESULT load_scene(collada::descriptor const * const descriptor);
|
||||||
void render(float t);
|
void update(float t);
|
||||||
|
void render();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HRESULT load_layouts();
|
HRESULT load_layouts();
|
||||||
void allocate_node_instances();
|
void allocate_node_instances();
|
||||||
void allocate_node_instance(collada::node const * const node,
|
void allocate_node_instance(collada::node const * const node,
|
||||||
node_instance * node_instance);
|
node_instance * node_instance);
|
||||||
|
void allocate_light_instances();
|
||||||
|
|
||||||
|
void node_world_transform(collada::node const& node, node_instance& node_instance);
|
||||||
|
void update_light_instances();
|
||||||
|
void update_light_instance_vectors(collada::light const& light,
|
||||||
|
node_instance const& node_instance,
|
||||||
|
int light_index);
|
||||||
|
|
||||||
void render_geometries(collada::instance_geometry const * const instance_geometries,
|
void render_geometries(collada::instance_geometry const * const instance_geometries,
|
||||||
int const instance_geometries_count);
|
int const instance_geometries_count);
|
||||||
void node_world_transform(collada::node const& node, node_instance& node_instance);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT LoadEffect();
|
HRESULT LoadEffect();
|
||||||
|
|||||||
@ -81,47 +81,24 @@ namespace collada {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// node
|
// light
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
struct lookat {
|
enum class light_type {
|
||||||
float3 const eye;
|
AMBIENT,
|
||||||
float3 const at;
|
DIRECTIONAL,
|
||||||
float3 const up;
|
POINT,
|
||||||
|
SPOT,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct matrix {
|
struct light {
|
||||||
float const _11, _12, _13, _14;
|
light_type type;
|
||||||
float const _21, _22, _23, _24;
|
float3 color;
|
||||||
float const _31, _32, _33, _34;
|
|
||||||
float const _41, _42, _43, _44;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class transform_type {
|
//////////////////////////////////////////////////////////////////////
|
||||||
LOOKAT,
|
// effect
|
||||||
MATRIX,
|
//////////////////////////////////////////////////////////////////////
|
||||||
ROTATE,
|
|
||||||
SCALE,
|
|
||||||
SKEW,
|
|
||||||
TRANSLATE,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct transform {
|
|
||||||
transform_type const type;
|
|
||||||
union {
|
|
||||||
lookat const lookat;
|
|
||||||
matrix const matrix;
|
|
||||||
float4 const rotate;
|
|
||||||
float3 const scale;
|
|
||||||
float7 const skew;
|
|
||||||
float3 const translate;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class node_type {
|
|
||||||
JOINT,
|
|
||||||
NODE,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct color_or_texture {
|
struct color_or_texture {
|
||||||
union {
|
union {
|
||||||
@ -192,12 +169,55 @@ namespace collada {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// node
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
struct lookat {
|
||||||
|
float3 const eye;
|
||||||
|
float3 const at;
|
||||||
|
float3 const up;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct matrix {
|
||||||
|
float const _11, _12, _13, _14;
|
||||||
|
float const _21, _22, _23, _24;
|
||||||
|
float const _31, _32, _33, _34;
|
||||||
|
float const _41, _42, _43, _44;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class transform_type {
|
||||||
|
LOOKAT,
|
||||||
|
MATRIX,
|
||||||
|
ROTATE,
|
||||||
|
SCALE,
|
||||||
|
SKEW,
|
||||||
|
TRANSLATE,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct transform {
|
||||||
|
transform_type const type;
|
||||||
|
union {
|
||||||
|
lookat const lookat;
|
||||||
|
matrix const matrix;
|
||||||
|
float4 const rotate;
|
||||||
|
float3 const scale;
|
||||||
|
float7 const skew;
|
||||||
|
float3 const translate;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class node_type {
|
||||||
|
JOINT,
|
||||||
|
NODE,
|
||||||
|
};
|
||||||
|
|
||||||
struct material {
|
struct material {
|
||||||
effect const * const effect;
|
effect const * const effect;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct instance_material {
|
struct instance_material {
|
||||||
int element_index;
|
int element_index; // an index into mesh.triangles
|
||||||
material const * const material;
|
material const * const material;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -208,6 +228,10 @@ namespace collada {
|
|||||||
int const instance_materials_count;
|
int const instance_materials_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct instance_light {
|
||||||
|
light const * const light;
|
||||||
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// animation
|
// animation
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
@ -286,6 +310,9 @@ namespace collada {
|
|||||||
instance_geometry const * const instance_geometries;
|
instance_geometry const * const instance_geometries;
|
||||||
int const instance_geometries_count;
|
int const instance_geometries_count;
|
||||||
|
|
||||||
|
instance_light const * const instance_lights;
|
||||||
|
int const instance_lights_count;
|
||||||
|
|
||||||
channel const * const * const channels;
|
channel const * const * const channels;
|
||||||
int const channels_count;
|
int const channels_count;
|
||||||
|
|
||||||
|
|||||||
4
main.rc
4
main.rc
@ -10,5 +10,5 @@ RES_FONT_TERMINUS_6X12 RCDATA "font/terminus_128x64_6x12.data"
|
|||||||
RES_COLLADA_FXO RCDATA "collada.fxo"
|
RES_COLLADA_FXO RCDATA "collada.fxo"
|
||||||
|
|
||||||
RES_COLLADA_SCENE_FXO RCDATA "collada_scene.fxo"
|
RES_COLLADA_SCENE_FXO RCDATA "collada_scene.fxo"
|
||||||
RES_MODELS_CURVE_INTERPOLATION_VTX RCDATA "models/curve_interpolation/curve_interpolation.vtx"
|
RES_MODELS_CURVE_INTERPOLATION_VTX RCDATA "scenes/curve_interpolation/curve_interpolation.vtx"
|
||||||
RES_MODELS_CURVE_INTERPOLATION_IDX RCDATA "models/curve_interpolation/curve_interpolation.idx"
|
RES_MODELS_CURVE_INTERPOLATION_IDX RCDATA "scenes/curve_interpolation/curve_interpolation.idx"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -4,6 +4,16 @@ namespace curve_interpolation {
|
|||||||
|
|
||||||
using namespace collada;
|
using namespace collada;
|
||||||
|
|
||||||
|
light const light_environmentambientlight = {
|
||||||
|
.type = light_type::AMBIENT,
|
||||||
|
.color = { 0.0f, 0.0f, 0.0f },
|
||||||
|
};
|
||||||
|
|
||||||
|
light const light_light_light = {
|
||||||
|
.type = light_type::DIRECTIONAL,
|
||||||
|
.color = { 1.0f, 1.0f, 1.0f },
|
||||||
|
};
|
||||||
|
|
||||||
float const array_node_cube_translation_x_input_array[] = {
|
float const array_node_cube_translation_x_input_array[] = {
|
||||||
0.0f,
|
0.0f,
|
||||||
1.666667f,
|
1.666667f,
|
||||||
@ -140,7 +150,7 @@ sampler const sampler_node_cube_translation_y_sampler = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_torus001_rotationx_angle_input_array[] = {
|
float const array_node_torus_rotationx_angle_input_array[] = {
|
||||||
0.0f,
|
0.0f,
|
||||||
0.8333334f,
|
0.8333334f,
|
||||||
1.666667f,
|
1.666667f,
|
||||||
@ -148,7 +158,7 @@ float const array_node_torus001_rotationx_angle_input_array[] = {
|
|||||||
3.333333f,
|
3.333333f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_torus001_rotationx_angle_output_array[] = {
|
float const array_node_torus_rotationx_angle_output_array[] = {
|
||||||
0.0f,
|
0.0f,
|
||||||
-90.0f,
|
-90.0f,
|
||||||
-180.0f,
|
-180.0f,
|
||||||
@ -156,7 +166,7 @@ float const array_node_torus001_rotationx_angle_output_array[] = {
|
|||||||
-360.0f,
|
-360.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_torus001_rotationx_angle_intangent_array[] = {
|
float const array_node_torus_rotationx_angle_intangent_array[] = {
|
||||||
0.9997917f, 0.0f,
|
0.9997917f, 0.0f,
|
||||||
0.3270486f, -89.70257f,
|
0.3270486f, -89.70257f,
|
||||||
0.9961964f, -179.1937f,
|
0.9961964f, -179.1937f,
|
||||||
@ -164,7 +174,7 @@ float const array_node_torus001_rotationx_angle_intangent_array[] = {
|
|||||||
2.6534f, -360.0f,
|
2.6534f, -360.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_torus001_rotationx_angle_outtangent_array[] = {
|
float const array_node_torus_rotationx_angle_outtangent_array[] = {
|
||||||
0.6602973f, 0.0f,
|
0.6602973f, 0.0f,
|
||||||
1.324714f, -90.28867f,
|
1.324714f, -90.28867f,
|
||||||
2.332406f, -180.8006f,
|
2.332406f, -180.8006f,
|
||||||
@ -172,7 +182,7 @@ float const array_node_torus001_rotationx_angle_outtangent_array[] = {
|
|||||||
2.333542f, -360.0f,
|
2.333542f, -360.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum interpolation const array_node_torus001_rotationx_angle_interpolation_array[] = {
|
enum interpolation const array_node_torus_rotationx_angle_interpolation_array[] = {
|
||||||
interpolation::BEZIER,
|
interpolation::BEZIER,
|
||||||
interpolation::BEZIER,
|
interpolation::BEZIER,
|
||||||
interpolation::BEZIER,
|
interpolation::BEZIER,
|
||||||
@ -180,175 +190,175 @@ enum interpolation const array_node_torus001_rotationx_angle_interpolation_array
|
|||||||
interpolation::BEZIER,
|
interpolation::BEZIER,
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler const sampler_node_torus001_rotationx_angle_sampler = {
|
sampler const sampler_node_torus_rotationx_angle_sampler = {
|
||||||
// node_torus001_rotationx_angle_input
|
// node_torus_rotationx_angle_input
|
||||||
.input = {
|
.input = {
|
||||||
.float_array = array_node_torus001_rotationx_angle_input_array,
|
.float_array = array_node_torus_rotationx_angle_input_array,
|
||||||
.count = 5,
|
.count = 5,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
// node_torus001_rotationx_angle_output
|
// node_torus_rotationx_angle_output
|
||||||
.output = {
|
.output = {
|
||||||
.float_array = array_node_torus001_rotationx_angle_output_array,
|
.float_array = array_node_torus_rotationx_angle_output_array,
|
||||||
.count = 5,
|
.count = 5,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
// node_torus001_rotationx_angle_intangent
|
// node_torus_rotationx_angle_intangent
|
||||||
.in_tangent = {
|
.in_tangent = {
|
||||||
.float_array = array_node_torus001_rotationx_angle_intangent_array,
|
.float_array = array_node_torus_rotationx_angle_intangent_array,
|
||||||
.count = 5,
|
.count = 5,
|
||||||
.stride = 2,
|
.stride = 2,
|
||||||
},
|
},
|
||||||
// node_torus001_rotationx_angle_outtangent
|
// node_torus_rotationx_angle_outtangent
|
||||||
.out_tangent = {
|
.out_tangent = {
|
||||||
.float_array = array_node_torus001_rotationx_angle_outtangent_array,
|
.float_array = array_node_torus_rotationx_angle_outtangent_array,
|
||||||
.count = 5,
|
.count = 5,
|
||||||
.stride = 2,
|
.stride = 2,
|
||||||
},
|
},
|
||||||
// node_torus001_rotationx_angle_interpolation
|
// node_torus_rotationx_angle_interpolation
|
||||||
.interpolation = {
|
.interpolation = {
|
||||||
.interpolation_array = array_node_torus001_rotationx_angle_interpolation_array,
|
.interpolation_array = array_node_torus_rotationx_angle_interpolation_array,
|
||||||
.count = 5,
|
.count = 5,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_scale_input_array[] = {
|
float const array_node_geosphere_scale_input_array[] = {
|
||||||
0.0f,
|
0.0f,
|
||||||
1.666667f,
|
1.666667f,
|
||||||
3.333333f,
|
3.333333f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_scale_output_array[] = {
|
float const array_node_geosphere_scale_output_array[] = {
|
||||||
1.0f, 1.0f, 1.0f,
|
1.0f, 1.0f, 1.0f,
|
||||||
1.996525f, 1.996525f, 1.996525f,
|
1.996525f, 1.996525f, 1.996525f,
|
||||||
1.0f, 1.0f, 1.0f,
|
1.0f, 1.0f, 1.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_scale_intangent_array[] = {
|
float const array_node_geosphere_scale_intangent_array[] = {
|
||||||
0.9997917f, 1.0f, 0.9997917f, 1.0f, 0.9997917f, 1.0f,
|
0.9997917f, 1.0f, 0.9997917f, 1.0f, 0.9997917f, 1.0f,
|
||||||
1.111167f, 1.996525f, 1.111167f, 1.996525f, 1.111167f, 1.996525f,
|
1.111167f, 1.996525f, 1.111167f, 1.996525f, 1.111167f, 1.996525f,
|
||||||
2.777833f, 1.0f, 2.777833f, 1.0f, 2.777833f, 1.0f,
|
2.777833f, 1.0f, 2.777833f, 1.0f, 2.777833f, 1.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_scale_outtangent_array[] = {
|
float const array_node_geosphere_scale_outtangent_array[] = {
|
||||||
0.5555f, 1.0f, 0.5555f, 1.0f, 0.5555f, 1.0f,
|
0.5555f, 1.0f, 0.5555f, 1.0f, 0.5555f, 1.0f,
|
||||||
2.222167f, 1.996525f, 2.222167f, 1.996525f, 2.222167f, 1.996525f,
|
2.222167f, 1.996525f, 2.222167f, 1.996525f, 2.222167f, 1.996525f,
|
||||||
2.333542f, 1.0f, 2.333542f, 1.0f, 2.333542f, 1.0f,
|
2.333542f, 1.0f, 2.333542f, 1.0f, 2.333542f, 1.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum interpolation const array_node_geosphere001_scale_interpolation_array[] = {
|
enum interpolation const array_node_geosphere_scale_interpolation_array[] = {
|
||||||
interpolation::BEZIER,
|
interpolation::BEZIER,
|
||||||
interpolation::BEZIER,
|
interpolation::BEZIER,
|
||||||
interpolation::BEZIER,
|
interpolation::BEZIER,
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler const sampler_node_geosphere001_scale_sampler = {
|
sampler const sampler_node_geosphere_scale_sampler = {
|
||||||
// node_geosphere001_scale_input
|
// node_geosphere_scale_input
|
||||||
.input = {
|
.input = {
|
||||||
.float_array = array_node_geosphere001_scale_input_array,
|
.float_array = array_node_geosphere_scale_input_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
// node_geosphere001_scale_output
|
// node_geosphere_scale_output
|
||||||
.output = {
|
.output = {
|
||||||
.float_array = array_node_geosphere001_scale_output_array,
|
.float_array = array_node_geosphere_scale_output_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 3,
|
.stride = 3,
|
||||||
},
|
},
|
||||||
// node_geosphere001_scale_intangent
|
// node_geosphere_scale_intangent
|
||||||
.in_tangent = {
|
.in_tangent = {
|
||||||
.float_array = array_node_geosphere001_scale_intangent_array,
|
.float_array = array_node_geosphere_scale_intangent_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 6,
|
.stride = 6,
|
||||||
},
|
},
|
||||||
// node_geosphere001_scale_outtangent
|
// node_geosphere_scale_outtangent
|
||||||
.out_tangent = {
|
.out_tangent = {
|
||||||
.float_array = array_node_geosphere001_scale_outtangent_array,
|
.float_array = array_node_geosphere_scale_outtangent_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 6,
|
.stride = 6,
|
||||||
},
|
},
|
||||||
// node_geosphere001_scale_interpolation
|
// node_geosphere_scale_interpolation
|
||||||
.interpolation = {
|
.interpolation = {
|
||||||
.interpolation_array = array_node_geosphere001_scale_interpolation_array,
|
.interpolation_array = array_node_geosphere_scale_interpolation_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_inversescaleaxisrotation_input_array[] = {
|
float const array_node_geosphere_inversescaleaxisrotation_input_array[] = {
|
||||||
0.0f,
|
0.0f,
|
||||||
1.666667f,
|
1.666667f,
|
||||||
3.333333f,
|
3.333333f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_inversescaleaxisrotation_output_array[] = {
|
float const array_node_geosphere_inversescaleaxisrotation_output_array[] = {
|
||||||
0.0f, 0.0f, 0.0f, 0.0f,
|
0.0f, 0.0f, 0.0f, 0.0f,
|
||||||
0.0f, 0.0f, 0.0f, 0.0f,
|
0.0f, 0.0f, 0.0f, 0.0f,
|
||||||
0.0f, 0.0f, 0.0f, 0.0f,
|
0.0f, 0.0f, 0.0f, 0.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum interpolation const array_node_geosphere001_inversescaleaxisrotation_interpolation_array[] = {
|
enum interpolation const array_node_geosphere_inversescaleaxisrotation_interpolation_array[] = {
|
||||||
interpolation::LINEAR,
|
interpolation::LINEAR,
|
||||||
interpolation::LINEAR,
|
interpolation::LINEAR,
|
||||||
interpolation::LINEAR,
|
interpolation::LINEAR,
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler const sampler_node_geosphere001_inversescaleaxisrotation_sampler = {
|
sampler const sampler_node_geosphere_inversescaleaxisrotation_sampler = {
|
||||||
// node_geosphere001_inversescaleaxisrotation_input
|
// node_geosphere_inversescaleaxisrotation_input
|
||||||
.input = {
|
.input = {
|
||||||
.float_array = array_node_geosphere001_inversescaleaxisrotation_input_array,
|
.float_array = array_node_geosphere_inversescaleaxisrotation_input_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
// node_geosphere001_inversescaleaxisrotation_output
|
// node_geosphere_inversescaleaxisrotation_output
|
||||||
.output = {
|
.output = {
|
||||||
.float_array = array_node_geosphere001_inversescaleaxisrotation_output_array,
|
.float_array = array_node_geosphere_inversescaleaxisrotation_output_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 4,
|
.stride = 4,
|
||||||
},
|
},
|
||||||
// node_geosphere001_inversescaleaxisrotation_interpolation
|
// node_geosphere_inversescaleaxisrotation_interpolation
|
||||||
.interpolation = {
|
.interpolation = {
|
||||||
.interpolation_array = array_node_geosphere001_inversescaleaxisrotation_interpolation_array,
|
.interpolation_array = array_node_geosphere_inversescaleaxisrotation_interpolation_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_scaleaxisrotation_input_array[] = {
|
float const array_node_geosphere_scaleaxisrotation_input_array[] = {
|
||||||
0.0f,
|
0.0f,
|
||||||
1.666667f,
|
1.666667f,
|
||||||
3.333333f,
|
3.333333f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float const array_node_geosphere001_scaleaxisrotation_output_array[] = {
|
float const array_node_geosphere_scaleaxisrotation_output_array[] = {
|
||||||
0.0f, 0.0f, 0.0f, 0.0f,
|
0.0f, 0.0f, 0.0f, 0.0f,
|
||||||
0.0f, 0.0f, 0.0f, 0.0f,
|
0.0f, 0.0f, 0.0f, 0.0f,
|
||||||
0.0f, 0.0f, 0.0f, 0.0f,
|
0.0f, 0.0f, 0.0f, 0.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum interpolation const array_node_geosphere001_scaleaxisrotation_interpolation_array[] = {
|
enum interpolation const array_node_geosphere_scaleaxisrotation_interpolation_array[] = {
|
||||||
interpolation::LINEAR,
|
interpolation::LINEAR,
|
||||||
interpolation::LINEAR,
|
interpolation::LINEAR,
|
||||||
interpolation::LINEAR,
|
interpolation::LINEAR,
|
||||||
};
|
};
|
||||||
|
|
||||||
sampler const sampler_node_geosphere001_scaleaxisrotation_sampler = {
|
sampler const sampler_node_geosphere_scaleaxisrotation_sampler = {
|
||||||
// node_geosphere001_scaleaxisrotation_input
|
// node_geosphere_scaleaxisrotation_input
|
||||||
.input = {
|
.input = {
|
||||||
.float_array = array_node_geosphere001_scaleaxisrotation_input_array,
|
.float_array = array_node_geosphere_scaleaxisrotation_input_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
// node_geosphere001_scaleaxisrotation_output
|
// node_geosphere_scaleaxisrotation_output
|
||||||
.output = {
|
.output = {
|
||||||
.float_array = array_node_geosphere001_scaleaxisrotation_output_array,
|
.float_array = array_node_geosphere_scaleaxisrotation_output_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 4,
|
.stride = 4,
|
||||||
},
|
},
|
||||||
// node_geosphere001_scaleaxisrotation_interpolation
|
// node_geosphere_scaleaxisrotation_interpolation
|
||||||
.interpolation = {
|
.interpolation = {
|
||||||
.interpolation_array = array_node_geosphere001_scaleaxisrotation_interpolation_array,
|
.interpolation_array = array_node_geosphere_scaleaxisrotation_interpolation_array,
|
||||||
.count = 3,
|
.count = 3,
|
||||||
.stride = 1,
|
.stride = 1,
|
||||||
},
|
},
|
||||||
@ -366,27 +376,27 @@ channel const node_channel_node_cube_translation_y = {
|
|||||||
.target_attribute = target_attribute::Y,
|
.target_attribute = target_attribute::Y,
|
||||||
};
|
};
|
||||||
|
|
||||||
channel const node_channel_node_torus001_rotationx_angle = {
|
channel const node_channel_node_torus_rotationx_angle = {
|
||||||
.source_sampler = &sampler_node_torus001_rotationx_angle_sampler,
|
.source_sampler = &sampler_node_torus_rotationx_angle_sampler,
|
||||||
.target_transform_index = 3,
|
.target_transform_index = 3,
|
||||||
.target_attribute = target_attribute::ANGLE,
|
.target_attribute = target_attribute::ANGLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
channel const node_channel_node_geosphere001_scale = {
|
channel const node_channel_node_geosphere_scale = {
|
||||||
.source_sampler = &sampler_node_geosphere001_scale_sampler,
|
.source_sampler = &sampler_node_geosphere_scale_sampler,
|
||||||
.target_transform_index = 2,
|
|
||||||
.target_attribute = target_attribute::ALL,
|
|
||||||
};
|
|
||||||
|
|
||||||
channel const node_channel_node_geosphere001_inversescaleaxisrotation = {
|
|
||||||
.source_sampler = &sampler_node_geosphere001_inversescaleaxisrotation_sampler,
|
|
||||||
.target_transform_index = 1,
|
.target_transform_index = 1,
|
||||||
.target_attribute = target_attribute::ALL,
|
.target_attribute = target_attribute::ALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
channel const node_channel_node_geosphere001_scaleaxisrotation = {
|
channel const node_channel_node_geosphere_inversescaleaxisrotation = {
|
||||||
.source_sampler = &sampler_node_geosphere001_scaleaxisrotation_sampler,
|
.source_sampler = &sampler_node_geosphere_inversescaleaxisrotation_sampler,
|
||||||
.target_transform_index = 3,
|
.target_transform_index = 0,
|
||||||
|
.target_attribute = target_attribute::ALL,
|
||||||
|
};
|
||||||
|
|
||||||
|
channel const node_channel_node_geosphere_scaleaxisrotation = {
|
||||||
|
.source_sampler = &sampler_node_geosphere_scaleaxisrotation_sampler,
|
||||||
|
.target_transform_index = 2,
|
||||||
.target_attribute = target_attribute::ALL,
|
.target_attribute = target_attribute::ALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -670,6 +680,34 @@ effect const effect_coloreffectr198g224b87 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
effect const effect_lightemit = {
|
||||||
|
.type = effect_type::BLINN,
|
||||||
|
.blinn = {
|
||||||
|
.emission = {
|
||||||
|
.color = {1.0f, 1.0f, 1.0f, 1.0f},
|
||||||
|
},
|
||||||
|
.ambient = {
|
||||||
|
.color = {0.0f, 0.0f, 0.0f, 1.0f},
|
||||||
|
},
|
||||||
|
.diffuse = {
|
||||||
|
.color = {0.0f, 0.0f, 0.0f, 1.0f},
|
||||||
|
},
|
||||||
|
.specular = {
|
||||||
|
.color = {0.0f, 0.0f, 0.0f, 1.0f},
|
||||||
|
},
|
||||||
|
.shininess = 10.0f,
|
||||||
|
.reflective = {
|
||||||
|
.color = {0.0f, 0.0f, 0.0f, 1.0f},
|
||||||
|
},
|
||||||
|
.reflectivity = 0.0f,
|
||||||
|
.transparent = {
|
||||||
|
.color = {1.0f, 1.0f, 1.0f, 1.0f},
|
||||||
|
},
|
||||||
|
.transparency = 1.0f,
|
||||||
|
.index_of_refraction = 0.0f,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
material const material_coloreffectr26g177b26_material = {
|
material const material_coloreffectr26g177b26_material = {
|
||||||
.effect = &effect_coloreffectr26g177b26,
|
.effect = &effect_coloreffectr26g177b26,
|
||||||
};
|
};
|
||||||
@ -710,6 +748,10 @@ material const material_material__20_material = {
|
|||||||
.effect = &effect_material__20,
|
.effect = &effect_material__20,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
material const material_lightemit_material = {
|
||||||
|
.effect = &effect_lightemit,
|
||||||
|
};
|
||||||
|
|
||||||
input_element const input_elements_position_0_3_normal_0_3_texcoord_0_3[] = {
|
input_element const input_elements_position_0_3_normal_0_3_texcoord_0_3[] = {
|
||||||
{
|
{
|
||||||
.semantic = "POSITION",
|
.semantic = "POSITION",
|
||||||
@ -774,7 +816,7 @@ geometry const geometry_geom_cube = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
triangles const triangles_geom_torus001[] = {
|
triangles const triangles_geom_torus[] = {
|
||||||
{
|
{
|
||||||
.count = 240, // triangles
|
.count = 240, // triangles
|
||||||
.index_offset = 0, // indices
|
.index_offset = 0, // indices
|
||||||
@ -782,9 +824,9 @@ triangles const triangles_geom_torus001[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
geometry const geometry_geom_torus001 = {
|
geometry const geometry_geom_torus = {
|
||||||
.mesh = {
|
.mesh = {
|
||||||
.triangles = triangles_geom_torus001,
|
.triangles = triangles_geom_torus,
|
||||||
.triangles_count = 1,
|
.triangles_count = 1,
|
||||||
|
|
||||||
.vertex_buffer_offset = 864,
|
.vertex_buffer_offset = 864,
|
||||||
@ -795,7 +837,7 @@ geometry const geometry_geom_torus001 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
triangles const triangles_geom_cylinder001[] = {
|
triangles const triangles_geom_cylinder[] = {
|
||||||
{
|
{
|
||||||
.count = 30, // triangles
|
.count = 30, // triangles
|
||||||
.index_offset = 0, // indices
|
.index_offset = 0, // indices
|
||||||
@ -803,9 +845,9 @@ triangles const triangles_geom_cylinder001[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
geometry const geometry_geom_cylinder001 = {
|
geometry const geometry_geom_cylinder = {
|
||||||
.mesh = {
|
.mesh = {
|
||||||
.triangles = triangles_geom_cylinder001,
|
.triangles = triangles_geom_cylinder,
|
||||||
.triangles_count = 1,
|
.triangles_count = 1,
|
||||||
|
|
||||||
.vertex_buffer_offset = 6012,
|
.vertex_buffer_offset = 6012,
|
||||||
@ -816,7 +858,7 @@ geometry const geometry_geom_cylinder001 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
triangles const triangles_geom_plane001[] = {
|
triangles const triangles_geom_plane[] = {
|
||||||
{
|
{
|
||||||
.count = 2, // triangles
|
.count = 2, // triangles
|
||||||
.index_offset = 0, // indices
|
.index_offset = 0, // indices
|
||||||
@ -824,9 +866,9 @@ triangles const triangles_geom_plane001[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
geometry const geometry_geom_plane001 = {
|
geometry const geometry_geom_plane = {
|
||||||
.mesh = {
|
.mesh = {
|
||||||
.triangles = triangles_geom_plane001,
|
.triangles = triangles_geom_plane,
|
||||||
.triangles_count = 1,
|
.triangles_count = 1,
|
||||||
|
|
||||||
.vertex_buffer_offset = 7164,
|
.vertex_buffer_offset = 7164,
|
||||||
@ -837,7 +879,7 @@ geometry const geometry_geom_plane001 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
triangles const triangles_geom_geosphere001[] = {
|
triangles const triangles_geom_geosphere[] = {
|
||||||
{
|
{
|
||||||
.count = 40, // triangles
|
.count = 40, // triangles
|
||||||
.index_offset = 0, // indices
|
.index_offset = 0, // indices
|
||||||
@ -845,9 +887,9 @@ triangles const triangles_geom_geosphere001[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
geometry const geometry_geom_geosphere001 = {
|
geometry const geometry_geom_geosphere = {
|
||||||
.mesh = {
|
.mesh = {
|
||||||
.triangles = triangles_geom_geosphere001,
|
.triangles = triangles_geom_geosphere,
|
||||||
.triangles_count = 1,
|
.triangles_count = 1,
|
||||||
|
|
||||||
.vertex_buffer_offset = 7308,
|
.vertex_buffer_offset = 7308,
|
||||||
@ -858,12 +900,34 @@ geometry const geometry_geom_geosphere001 = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
triangles const triangles_geom_lightindicator[] = {
|
||||||
|
{
|
||||||
|
.count = 8, // triangles
|
||||||
|
.index_offset = 0, // indices
|
||||||
|
.inputs_index = 0, // index into inputs_list
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
geometry const geometry_geom_lightindicator = {
|
||||||
|
.mesh = {
|
||||||
|
.triangles = triangles_geom_lightindicator,
|
||||||
|
.triangles_count = 1,
|
||||||
|
|
||||||
|
.vertex_buffer_offset = 11628,
|
||||||
|
.vertex_buffer_size = 864,
|
||||||
|
|
||||||
|
.index_buffer_offset = 3888,
|
||||||
|
.index_buffer_size = 96,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
geometry const * const geometries[] = {
|
geometry const * const geometries[] = {
|
||||||
&geometry_geom_cube,
|
&geometry_geom_cube,
|
||||||
&geometry_geom_torus001,
|
&geometry_geom_torus,
|
||||||
&geometry_geom_cylinder001,
|
&geometry_geom_cylinder,
|
||||||
&geometry_geom_plane001,
|
&geometry_geom_plane,
|
||||||
&geometry_geom_geosphere001,
|
&geometry_geom_geosphere,
|
||||||
|
&geometry_geom_lightindicator,
|
||||||
};
|
};
|
||||||
|
|
||||||
transform const transforms_node_environmentambientlight[] = {
|
transform const transforms_node_environmentambientlight[] = {
|
||||||
@ -872,6 +936,12 @@ transform const transforms_node_environmentambientlight[] = {
|
|||||||
instance_geometry const instance_geometries_node_environmentambientlight[] = {
|
instance_geometry const instance_geometries_node_environmentambientlight[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
instance_light const instance_lights_node_environmentambientlight[] = {
|
||||||
|
{
|
||||||
|
.light = &light_environmentambientlight,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
channel const * const node_channels_node_environmentambientlight[] = {};
|
channel const * const node_channels_node_environmentambientlight[] = {};
|
||||||
|
|
||||||
node const node_node_environmentambientlight = {
|
node const node_node_environmentambientlight = {
|
||||||
@ -885,6 +955,9 @@ node const node_node_environmentambientlight = {
|
|||||||
.instance_geometries = instance_geometries_node_environmentambientlight,
|
.instance_geometries = instance_geometries_node_environmentambientlight,
|
||||||
.instance_geometries_count = 0,
|
.instance_geometries_count = 0,
|
||||||
|
|
||||||
|
.instance_lights = instance_lights_node_environmentambientlight,
|
||||||
|
.instance_lights_count = 1,
|
||||||
|
|
||||||
.channels = node_channels_node_environmentambientlight,
|
.channels = node_channels_node_environmentambientlight,
|
||||||
.channels_count = 0,
|
.channels_count = 0,
|
||||||
};
|
};
|
||||||
@ -931,9 +1004,12 @@ instance_geometry const instance_geometries_node_cube[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
instance_light const instance_lights_node_cube[] = {
|
||||||
|
};
|
||||||
|
|
||||||
channel const * const node_channels_node_cube[] = {
|
channel const * const node_channels_node_cube[] = {
|
||||||
&node_channel_node_cube_translation_y,
|
|
||||||
&node_channel_node_cube_translation_x,
|
&node_channel_node_cube_translation_x,
|
||||||
|
&node_channel_node_cube_translation_y,
|
||||||
};
|
};
|
||||||
|
|
||||||
node const node_node_cube = {
|
node const node_node_cube = {
|
||||||
@ -947,11 +1023,14 @@ node const node_node_cube = {
|
|||||||
.instance_geometries = instance_geometries_node_cube,
|
.instance_geometries = instance_geometries_node_cube,
|
||||||
.instance_geometries_count = 1,
|
.instance_geometries_count = 1,
|
||||||
|
|
||||||
|
.instance_lights = instance_lights_node_cube,
|
||||||
|
.instance_lights_count = 0,
|
||||||
|
|
||||||
.channels = node_channels_node_cube,
|
.channels = node_channels_node_cube,
|
||||||
.channels_count = 2,
|
.channels_count = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
transform const transforms_node_torus001[] = {
|
transform const transforms_node_torus[] = {
|
||||||
{
|
{
|
||||||
.type = transform_type::TRANSLATE,
|
.type = transform_type::TRANSLATE,
|
||||||
.translate = {5.0f, 1.14258e-07f, 2.0f},
|
.translate = {5.0f, 1.14258e-07f, 2.0f},
|
||||||
@ -974,77 +1053,89 @@ transform const transforms_node_torus001[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_material const instance_materials_node_torus001_0[] = {
|
instance_material const instance_materials_node_torus_0[] = {
|
||||||
{
|
{
|
||||||
.element_index = 0, // an index into mesh.triangles
|
.element_index = 0, // an index into mesh.triangles
|
||||||
.material = &material_coloreffectr26g177b26_material,
|
.material = &material_coloreffectr26g177b26_material,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_geometry const instance_geometries_node_torus001[] = {
|
instance_geometry const instance_geometries_node_torus[] = {
|
||||||
{
|
{
|
||||||
.geometry = &geometry_geom_torus001,
|
.geometry = &geometry_geom_torus,
|
||||||
.instance_materials = instance_materials_node_torus001_0,
|
.instance_materials = instance_materials_node_torus_0,
|
||||||
.instance_materials_count = 1,
|
.instance_materials_count = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
channel const * const node_channels_node_torus001[] = {
|
instance_light const instance_lights_node_torus[] = {
|
||||||
&node_channel_node_torus001_rotationx_angle,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
node const node_node_torus001 = {
|
channel const * const node_channels_node_torus[] = {
|
||||||
|
&node_channel_node_torus_rotationx_angle,
|
||||||
|
};
|
||||||
|
|
||||||
|
node const node_node_torus = {
|
||||||
.parent_index = 1,
|
.parent_index = 1,
|
||||||
|
|
||||||
.type = node_type::NODE,
|
.type = node_type::NODE,
|
||||||
|
|
||||||
.transforms = transforms_node_torus001,
|
.transforms = transforms_node_torus,
|
||||||
.transforms_count = 5,
|
.transforms_count = 5,
|
||||||
|
|
||||||
.instance_geometries = instance_geometries_node_torus001,
|
.instance_geometries = instance_geometries_node_torus,
|
||||||
.instance_geometries_count = 1,
|
.instance_geometries_count = 1,
|
||||||
|
|
||||||
.channels = node_channels_node_torus001,
|
.instance_lights = instance_lights_node_torus,
|
||||||
|
.instance_lights_count = 0,
|
||||||
|
|
||||||
|
.channels = node_channels_node_torus,
|
||||||
.channels_count = 1,
|
.channels_count = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
transform const transforms_node_cylinder001[] = {
|
transform const transforms_node_cylinder[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_material const instance_materials_node_cylinder001_0[] = {
|
instance_material const instance_materials_node_cylinder_0[] = {
|
||||||
{
|
{
|
||||||
.element_index = 0, // an index into mesh.triangles
|
.element_index = 0, // an index into mesh.triangles
|
||||||
.material = &material_coloreffectr229g154b215_material,
|
.material = &material_coloreffectr229g154b215_material,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_geometry const instance_geometries_node_cylinder001[] = {
|
instance_geometry const instance_geometries_node_cylinder[] = {
|
||||||
{
|
{
|
||||||
.geometry = &geometry_geom_cylinder001,
|
.geometry = &geometry_geom_cylinder,
|
||||||
.instance_materials = instance_materials_node_cylinder001_0,
|
.instance_materials = instance_materials_node_cylinder_0,
|
||||||
.instance_materials_count = 1,
|
.instance_materials_count = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
channel const * const node_channels_node_cylinder001[] = {
|
instance_light const instance_lights_node_cylinder[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
node const node_node_cylinder001 = {
|
channel const * const node_channels_node_cylinder[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
node const node_node_cylinder = {
|
||||||
.parent_index = -1,
|
.parent_index = -1,
|
||||||
|
|
||||||
.type = node_type::NODE,
|
.type = node_type::NODE,
|
||||||
|
|
||||||
.transforms = transforms_node_cylinder001,
|
.transforms = transforms_node_cylinder,
|
||||||
.transforms_count = 0,
|
.transforms_count = 0,
|
||||||
|
|
||||||
.instance_geometries = instance_geometries_node_cylinder001,
|
.instance_geometries = instance_geometries_node_cylinder,
|
||||||
.instance_geometries_count = 1,
|
.instance_geometries_count = 1,
|
||||||
|
|
||||||
.channels = node_channels_node_cylinder001,
|
.instance_lights = instance_lights_node_cylinder,
|
||||||
|
.instance_lights_count = 0,
|
||||||
|
|
||||||
|
.channels = node_channels_node_cylinder,
|
||||||
.channels_count = 0,
|
.channels_count = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
transform const transforms_node_plane001[] = {
|
transform const transforms_node_plane[] = {
|
||||||
{
|
{
|
||||||
.type = transform_type::TRANSLATE,
|
.type = transform_type::TRANSLATE,
|
||||||
.translate = {0.0f, 0.0f, 0.01f},
|
.translate = {0.0f, 0.0f, 0.01f},
|
||||||
@ -1055,44 +1146,46 @@ transform const transforms_node_plane001[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_material const instance_materials_node_plane001_0[] = {
|
instance_material const instance_materials_node_plane_0[] = {
|
||||||
{
|
{
|
||||||
.element_index = 0, // an index into mesh.triangles
|
.element_index = 0, // an index into mesh.triangles
|
||||||
.material = &material_coloreffectr28g149b177_material,
|
.material = &material_coloreffectr28g149b177_material,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_geometry const instance_geometries_node_plane001[] = {
|
instance_geometry const instance_geometries_node_plane[] = {
|
||||||
{
|
{
|
||||||
.geometry = &geometry_geom_plane001,
|
.geometry = &geometry_geom_plane,
|
||||||
.instance_materials = instance_materials_node_plane001_0,
|
.instance_materials = instance_materials_node_plane_0,
|
||||||
.instance_materials_count = 1,
|
.instance_materials_count = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
channel const * const node_channels_node_plane001[] = {
|
instance_light const instance_lights_node_plane[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
node const node_node_plane001 = {
|
channel const * const node_channels_node_plane[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
node const node_node_plane = {
|
||||||
.parent_index = -1,
|
.parent_index = -1,
|
||||||
|
|
||||||
.type = node_type::NODE,
|
.type = node_type::NODE,
|
||||||
|
|
||||||
.transforms = transforms_node_plane001,
|
.transforms = transforms_node_plane,
|
||||||
.transforms_count = 2,
|
.transforms_count = 2,
|
||||||
|
|
||||||
.instance_geometries = instance_geometries_node_plane001,
|
.instance_geometries = instance_geometries_node_plane,
|
||||||
.instance_geometries_count = 1,
|
.instance_geometries_count = 1,
|
||||||
|
|
||||||
.channels = node_channels_node_plane001,
|
.instance_lights = instance_lights_node_plane,
|
||||||
|
.instance_lights_count = 0,
|
||||||
|
|
||||||
|
.channels = node_channels_node_plane,
|
||||||
.channels_count = 0,
|
.channels_count = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
transform const transforms_node_geosphere001[] = {
|
transform const transforms_node_geosphere[] = {
|
||||||
{
|
|
||||||
.type = transform_type::TRANSLATE,
|
|
||||||
.translate = {0.03164387f, -0.03838623f, 0.0f},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
.type = transform_type::ROTATE,
|
.type = transform_type::ROTATE,
|
||||||
.rotate = {0.0f, 0.0f, 0.0f, 0.0f},
|
.rotate = {0.0f, 0.0f, 0.0f, 0.0f},
|
||||||
@ -1107,49 +1200,140 @@ transform const transforms_node_geosphere001[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_material const instance_materials_node_geosphere001_0[] = {
|
instance_material const instance_materials_node_geosphere_0[] = {
|
||||||
{
|
{
|
||||||
.element_index = 0, // an index into mesh.triangles
|
.element_index = 0, // an index into mesh.triangles
|
||||||
.material = &material_coloreffectr198g224b87_material,
|
.material = &material_coloreffectr198g224b87_material,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
instance_geometry const instance_geometries_node_geosphere001[] = {
|
instance_geometry const instance_geometries_node_geosphere[] = {
|
||||||
{
|
{
|
||||||
.geometry = &geometry_geom_geosphere001,
|
.geometry = &geometry_geom_geosphere,
|
||||||
.instance_materials = instance_materials_node_geosphere001_0,
|
.instance_materials = instance_materials_node_geosphere_0,
|
||||||
.instance_materials_count = 1,
|
.instance_materials_count = 1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
channel const * const node_channels_node_geosphere001[] = {
|
instance_light const instance_lights_node_geosphere[] = {
|
||||||
&node_channel_node_geosphere001_inversescaleaxisrotation,
|
|
||||||
&node_channel_node_geosphere001_scale,
|
|
||||||
&node_channel_node_geosphere001_scaleaxisrotation,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
node const node_node_geosphere001 = {
|
channel const * const node_channels_node_geosphere[] = {
|
||||||
|
&node_channel_node_geosphere_scale,
|
||||||
|
&node_channel_node_geosphere_inversescaleaxisrotation,
|
||||||
|
&node_channel_node_geosphere_scaleaxisrotation,
|
||||||
|
};
|
||||||
|
|
||||||
|
node const node_node_geosphere = {
|
||||||
.parent_index = -1,
|
.parent_index = -1,
|
||||||
|
|
||||||
.type = node_type::NODE,
|
.type = node_type::NODE,
|
||||||
|
|
||||||
.transforms = transforms_node_geosphere001,
|
.transforms = transforms_node_geosphere,
|
||||||
.transforms_count = 4,
|
.transforms_count = 3,
|
||||||
|
|
||||||
.instance_geometries = instance_geometries_node_geosphere001,
|
.instance_geometries = instance_geometries_node_geosphere,
|
||||||
.instance_geometries_count = 1,
|
.instance_geometries_count = 1,
|
||||||
|
|
||||||
.channels = node_channels_node_geosphere001,
|
.instance_lights = instance_lights_node_geosphere,
|
||||||
|
.instance_lights_count = 0,
|
||||||
|
|
||||||
|
.channels = node_channels_node_geosphere,
|
||||||
.channels_count = 3,
|
.channels_count = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
transform const transforms_node_light[] = {
|
||||||
|
{
|
||||||
|
.type = transform_type::TRANSLATE,
|
||||||
|
.translate = {2.124535f, 8.291501f, 6.185831f},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
instance_geometry const instance_geometries_node_light[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
instance_light const instance_lights_node_light[] = {
|
||||||
|
{
|
||||||
|
.light = &light_light_light,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
channel const * const node_channels_node_light[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
node const node_node_light = {
|
||||||
|
.parent_index = -1,
|
||||||
|
|
||||||
|
.type = node_type::NODE,
|
||||||
|
|
||||||
|
.transforms = transforms_node_light,
|
||||||
|
.transforms_count = 1,
|
||||||
|
|
||||||
|
.instance_geometries = instance_geometries_node_light,
|
||||||
|
.instance_geometries_count = 0,
|
||||||
|
|
||||||
|
.instance_lights = instance_lights_node_light,
|
||||||
|
.instance_lights_count = 1,
|
||||||
|
|
||||||
|
.channels = node_channels_node_light,
|
||||||
|
.channels_count = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
transform const transforms_node_lightindicator[] = {
|
||||||
|
{
|
||||||
|
.type = transform_type::ROTATE,
|
||||||
|
.rotate = {0.5773504f, -0.5773501f, -0.5773504f, -120.0f},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
instance_material const instance_materials_node_lightindicator_0[] = {
|
||||||
|
{
|
||||||
|
.element_index = 0, // an index into mesh.triangles
|
||||||
|
.material = &material_lightemit_material,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
instance_geometry const instance_geometries_node_lightindicator[] = {
|
||||||
|
{
|
||||||
|
.geometry = &geometry_geom_lightindicator,
|
||||||
|
.instance_materials = instance_materials_node_lightindicator_0,
|
||||||
|
.instance_materials_count = 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
instance_light const instance_lights_node_lightindicator[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
channel const * const node_channels_node_lightindicator[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
node const node_node_lightindicator = {
|
||||||
|
.parent_index = 6,
|
||||||
|
|
||||||
|
.type = node_type::NODE,
|
||||||
|
|
||||||
|
.transforms = transforms_node_lightindicator,
|
||||||
|
.transforms_count = 1,
|
||||||
|
|
||||||
|
.instance_geometries = instance_geometries_node_lightindicator,
|
||||||
|
.instance_geometries_count = 1,
|
||||||
|
|
||||||
|
.instance_lights = instance_lights_node_lightindicator,
|
||||||
|
.instance_lights_count = 0,
|
||||||
|
|
||||||
|
.channels = node_channels_node_lightindicator,
|
||||||
|
.channels_count = 0,
|
||||||
|
};
|
||||||
|
|
||||||
node const * const nodes[] = {
|
node const * const nodes[] = {
|
||||||
&node_node_environmentambientlight,
|
&node_node_environmentambientlight,
|
||||||
&node_node_cube,
|
&node_node_cube,
|
||||||
&node_node_torus001,
|
&node_node_torus,
|
||||||
&node_node_cylinder001,
|
&node_node_cylinder,
|
||||||
&node_node_plane001,
|
&node_node_plane,
|
||||||
&node_node_geosphere001,
|
&node_node_geosphere,
|
||||||
|
&node_node_light,
|
||||||
|
&node_node_lightindicator,
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs const inputs_list[] = {
|
inputs const inputs_list[] = {
|
||||||
Loading…
x
Reference in New Issue
Block a user