├── .gitignore ├── .gitmodules ├── CMakeSettings.json ├── Editor ├── BuiltinResources │ ├── Fonts │ │ ├── Roboto-License.txt │ │ └── Roboto-Medium.ttf │ ├── GltfFiles │ │ ├── material_sphere │ │ │ ├── material_sphere.bin │ │ │ └── material_sphere.gltf │ │ ├── mech_drone │ │ │ ├── scene.bin │ │ │ ├── scene.gltf │ │ │ └── textures │ │ │ │ ├── Fire_diffuse.png │ │ │ │ ├── Fire_emissive.png │ │ │ │ ├── Robot_diffuse.png │ │ │ │ ├── Robot_emissive.png │ │ │ │ ├── Robot_normal.png │ │ │ │ ├── Robot_occlusion.png │ │ │ │ └── Robot_specularGlossiness.png │ │ ├── test.bin │ │ ├── test.gltf │ │ └── transparency_test │ │ │ ├── transparency_test.bin │ │ │ └── transparency_test.gltf │ ├── Materials │ │ ├── transparency_test.fs │ │ ├── transparency_test.mat │ │ ├── ui.fs │ │ └── ui.mat │ └── Textures │ │ ├── Ridgecrest_Road_Ref.hdr │ │ ├── skybox_0.jpg │ │ └── test.png ├── CMakeLists.txt ├── External │ ├── cgltf │ │ ├── LICENSE │ │ ├── cgltf.h │ │ └── cgltf_write.h │ ├── imgui │ │ ├── .editorconfig │ │ ├── .gitattributes │ │ ├── .github │ │ │ ├── FUNDING.yml │ │ │ ├── issue_template.md │ │ │ ├── pull_request_template.md │ │ │ └── workflows │ │ │ │ ├── build.yml │ │ │ │ ├── scheduled.yml │ │ │ │ └── static-analysis.yml │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── LICENSE.txt │ │ ├── docs │ │ │ ├── BACKENDS.md │ │ │ ├── CHANGELOG.txt │ │ │ ├── EXAMPLES.md │ │ │ ├── FAQ.md │ │ │ ├── FONTS.md │ │ │ ├── README.md │ │ │ └── TODO.txt │ │ ├── imconfig.h │ │ ├── imgui.cpp │ │ ├── imgui.h │ │ ├── imgui_demo.cpp │ │ ├── imgui_draw.cpp │ │ ├── imgui_internal.h │ │ ├── imgui_tables.cpp │ │ ├── imgui_widgets.cpp │ │ ├── imstb_rectpack.h │ │ ├── imstb_textedit.h │ │ ├── imstb_truetype.h │ │ └── misc │ │ │ ├── README.txt │ │ │ ├── cpp │ │ │ ├── README.txt │ │ │ ├── imgui_stdlib.cpp │ │ │ └── imgui_stdlib.h │ │ │ ├── debuggers │ │ │ ├── README.txt │ │ │ ├── imgui.gdb │ │ │ ├── imgui.natstepfilter │ │ │ └── imgui.natvis │ │ │ ├── fonts │ │ │ ├── Cousine-Regular.ttf │ │ │ ├── DroidSans.ttf │ │ │ ├── Karla-Regular.ttf │ │ │ ├── ProggyClean.ttf │ │ │ ├── ProggyTiny.ttf │ │ │ ├── Roboto-Medium.ttf │ │ │ └── binary_to_compressed_c.cpp │ │ │ ├── freetype │ │ │ ├── README.md │ │ │ ├── imgui_freetype.cpp │ │ │ └── imgui_freetype.h │ │ │ └── single_file │ │ │ └── imgui_single_file.h │ ├── stb │ │ ├── stb_image.h │ │ └── stb_image_write.h │ └── xatlas │ │ ├── LICENSE │ │ ├── xatlas.cpp │ │ └── xatlas.h └── Source │ ├── CameraController.cpp │ ├── CameraController.h │ ├── EditorMisc.cpp │ ├── EditorMisc.h │ ├── GltfImporter.cpp │ ├── GltfImporter.h │ ├── TestScene │ ├── AnimationTestScene.cpp │ ├── AnimationTestScene.h │ ├── MaterialTestScene.cpp │ ├── MaterialTestScene.h │ ├── ShadowTestScene.cpp │ ├── ShadowTestScene.h │ ├── SkyAtmosphereTestScene.cpp │ ├── SkyAtmosphereTestScene.h │ ├── TestScene.h │ ├── TransparencyTestScene.cpp │ └── TransparencyTestScene.h │ ├── TextureImporter.cpp │ ├── TextureImporter.h │ └── main.cpp ├── Engine ├── BuiltinResources │ ├── Materials │ │ ├── blit.fs │ │ ├── blit.mat │ │ ├── debug.fs │ │ ├── debug.mat │ │ ├── equirectangular_to_cube.fs │ │ ├── equirectangular_to_cube.mat │ │ ├── fxaa.fs │ │ ├── fxaa.mat │ │ ├── skybox.fs │ │ ├── skybox.mat │ │ ├── ui.fs │ │ └── ui.mat │ └── Shaders │ │ ├── Atmosphere │ │ ├── atmosphere_comon.fs │ │ ├── atmosphere_comon.vs │ │ ├── atmosphere_compute_multi_scattering.comp │ │ ├── atmosphere_compute_transmittance.fs │ │ └── atmosphere_ray_marching.fs │ │ ├── brdf.fs │ │ ├── brdf_integration.comp │ │ ├── common_data.fs │ │ ├── compute_irradiance_map.comp │ │ ├── compute_specular_map.comp │ │ ├── depth_main.fs │ │ ├── depth_main.vs │ │ ├── inputs.fs │ │ ├── inputs.vs │ │ ├── light_directional.fs │ │ ├── light_indirect.fs │ │ ├── light_punctual.fs │ │ ├── main.fs │ │ ├── main.vs │ │ ├── material_params.fs │ │ ├── material_params.vs │ │ ├── pano_to_cube.comp │ │ ├── shading_lit.fs │ │ ├── shading_model_standard.fs │ │ └── shading_unlit.fs ├── CMakeLists.txt ├── External │ ├── filesystem │ │ ├── LICENSE │ │ └── filesystem │ │ │ ├── fwd.h │ │ │ ├── path.h │ │ │ └── resolver.h │ ├── glm │ │ ├── CMakeLists.txt │ │ ├── common.hpp │ │ ├── detail │ │ │ ├── _features.hpp │ │ │ ├── _fixes.hpp │ │ │ ├── _noise.hpp │ │ │ ├── _swizzle.hpp │ │ │ ├── _swizzle_func.hpp │ │ │ ├── _vectorize.hpp │ │ │ ├── compute_common.hpp │ │ │ ├── compute_vector_relational.hpp │ │ │ ├── func_common.inl │ │ │ ├── func_common_simd.inl │ │ │ ├── func_exponential.inl │ │ │ ├── func_exponential_simd.inl │ │ │ ├── func_geometric.inl │ │ │ ├── func_geometric_simd.inl │ │ │ ├── func_integer.inl │ │ │ ├── func_integer_simd.inl │ │ │ ├── func_matrix.inl │ │ │ ├── func_matrix_simd.inl │ │ │ ├── func_packing.inl │ │ │ ├── func_packing_simd.inl │ │ │ ├── func_trigonometric.inl │ │ │ ├── func_trigonometric_simd.inl │ │ │ ├── func_vector_relational.inl │ │ │ ├── func_vector_relational_simd.inl │ │ │ ├── glm.cpp │ │ │ ├── qualifier.hpp │ │ │ ├── setup.hpp │ │ │ ├── type_float.hpp │ │ │ ├── type_half.hpp │ │ │ ├── type_half.inl │ │ │ ├── type_mat2x2.hpp │ │ │ ├── type_mat2x2.inl │ │ │ ├── type_mat2x3.hpp │ │ │ ├── type_mat2x3.inl │ │ │ ├── type_mat2x4.hpp │ │ │ ├── type_mat2x4.inl │ │ │ ├── type_mat3x2.hpp │ │ │ ├── type_mat3x2.inl │ │ │ ├── type_mat3x3.hpp │ │ │ ├── type_mat3x3.inl │ │ │ ├── type_mat3x4.hpp │ │ │ ├── type_mat3x4.inl │ │ │ ├── type_mat4x2.hpp │ │ │ ├── type_mat4x2.inl │ │ │ ├── type_mat4x3.hpp │ │ │ ├── type_mat4x3.inl │ │ │ ├── type_mat4x4.hpp │ │ │ ├── type_mat4x4.inl │ │ │ ├── type_mat4x4_simd.inl │ │ │ ├── type_quat.hpp │ │ │ ├── type_quat.inl │ │ │ ├── type_quat_simd.inl │ │ │ ├── type_vec1.hpp │ │ │ ├── type_vec1.inl │ │ │ ├── type_vec2.hpp │ │ │ ├── type_vec2.inl │ │ │ ├── type_vec3.hpp │ │ │ ├── type_vec3.inl │ │ │ ├── type_vec4.hpp │ │ │ ├── type_vec4.inl │ │ │ └── type_vec4_simd.inl │ │ ├── exponential.hpp │ │ ├── ext.hpp │ │ ├── ext │ │ │ ├── matrix_clip_space.hpp │ │ │ ├── matrix_clip_space.inl │ │ │ ├── matrix_double2x2.hpp │ │ │ ├── matrix_double2x2_precision.hpp │ │ │ ├── matrix_double2x3.hpp │ │ │ ├── matrix_double2x3_precision.hpp │ │ │ ├── matrix_double2x4.hpp │ │ │ ├── matrix_double2x4_precision.hpp │ │ │ ├── matrix_double3x2.hpp │ │ │ ├── matrix_double3x2_precision.hpp │ │ │ ├── matrix_double3x3.hpp │ │ │ ├── matrix_double3x3_precision.hpp │ │ │ ├── matrix_double3x4.hpp │ │ │ ├── matrix_double3x4_precision.hpp │ │ │ ├── matrix_double4x2.hpp │ │ │ ├── matrix_double4x2_precision.hpp │ │ │ ├── matrix_double4x3.hpp │ │ │ ├── matrix_double4x3_precision.hpp │ │ │ ├── matrix_double4x4.hpp │ │ │ ├── matrix_double4x4_precision.hpp │ │ │ ├── matrix_float2x2.hpp │ │ │ ├── matrix_float2x2_precision.hpp │ │ │ ├── matrix_float2x3.hpp │ │ │ ├── matrix_float2x3_precision.hpp │ │ │ ├── matrix_float2x4.hpp │ │ │ ├── matrix_float2x4_precision.hpp │ │ │ ├── matrix_float3x2.hpp │ │ │ ├── matrix_float3x2_precision.hpp │ │ │ ├── matrix_float3x3.hpp │ │ │ ├── matrix_float3x3_precision.hpp │ │ │ ├── matrix_float3x4.hpp │ │ │ ├── matrix_float3x4_precision.hpp │ │ │ ├── matrix_float4x2.hpp │ │ │ ├── matrix_float4x2_precision.hpp │ │ │ ├── matrix_float4x3.hpp │ │ │ ├── matrix_float4x3_precision.hpp │ │ │ ├── matrix_float4x4.hpp │ │ │ ├── matrix_float4x4_precision.hpp │ │ │ ├── matrix_projection.hpp │ │ │ ├── matrix_projection.inl │ │ │ ├── matrix_relational.hpp │ │ │ ├── matrix_relational.inl │ │ │ ├── matrix_transform.hpp │ │ │ ├── matrix_transform.inl │ │ │ ├── quaternion_common.hpp │ │ │ ├── quaternion_common.inl │ │ │ ├── quaternion_common_simd.inl │ │ │ ├── quaternion_double.hpp │ │ │ ├── quaternion_double_precision.hpp │ │ │ ├── quaternion_exponential.hpp │ │ │ ├── quaternion_exponential.inl │ │ │ ├── quaternion_float.hpp │ │ │ ├── quaternion_float_precision.hpp │ │ │ ├── quaternion_geometric.hpp │ │ │ ├── quaternion_geometric.inl │ │ │ ├── quaternion_relational.hpp │ │ │ ├── quaternion_relational.inl │ │ │ ├── quaternion_transform.hpp │ │ │ ├── quaternion_transform.inl │ │ │ ├── quaternion_trigonometric.hpp │ │ │ ├── quaternion_trigonometric.inl │ │ │ ├── scalar_common.hpp │ │ │ ├── scalar_common.inl │ │ │ ├── scalar_constants.hpp │ │ │ ├── scalar_constants.inl │ │ │ ├── scalar_int_sized.hpp │ │ │ ├── scalar_relational.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── scalar_uint_sized.hpp │ │ │ ├── scalar_ulp.hpp │ │ │ ├── scalar_ulp.inl │ │ │ ├── vector_bool1.hpp │ │ │ ├── vector_bool1_precision.hpp │ │ │ ├── vector_bool2.hpp │ │ │ ├── vector_bool2_precision.hpp │ │ │ ├── vector_bool3.hpp │ │ │ ├── vector_bool3_precision.hpp │ │ │ ├── vector_bool4.hpp │ │ │ ├── vector_bool4_precision.hpp │ │ │ ├── vector_common.hpp │ │ │ ├── vector_common.inl │ │ │ ├── vector_double1.hpp │ │ │ ├── vector_double1_precision.hpp │ │ │ ├── vector_double2.hpp │ │ │ ├── vector_double2_precision.hpp │ │ │ ├── vector_double3.hpp │ │ │ ├── vector_double3_precision.hpp │ │ │ ├── vector_double4.hpp │ │ │ ├── vector_double4_precision.hpp │ │ │ ├── vector_float1.hpp │ │ │ ├── vector_float1_precision.hpp │ │ │ ├── vector_float2.hpp │ │ │ ├── vector_float2_precision.hpp │ │ │ ├── vector_float3.hpp │ │ │ ├── vector_float3_precision.hpp │ │ │ ├── vector_float4.hpp │ │ │ ├── vector_float4_precision.hpp │ │ │ ├── vector_int1.hpp │ │ │ ├── vector_int1_precision.hpp │ │ │ ├── vector_int2.hpp │ │ │ ├── vector_int2_precision.hpp │ │ │ ├── vector_int3.hpp │ │ │ ├── vector_int3_precision.hpp │ │ │ ├── vector_int4.hpp │ │ │ ├── vector_int4_precision.hpp │ │ │ ├── vector_relational.hpp │ │ │ ├── vector_relational.inl │ │ │ ├── vector_uint1.hpp │ │ │ ├── vector_uint1_precision.hpp │ │ │ ├── vector_uint2.hpp │ │ │ ├── vector_uint2_precision.hpp │ │ │ ├── vector_uint3.hpp │ │ │ ├── vector_uint3_precision.hpp │ │ │ ├── vector_uint4.hpp │ │ │ ├── vector_uint4_precision.hpp │ │ │ ├── vector_ulp.hpp │ │ │ └── vector_ulp.inl │ │ ├── fwd.hpp │ │ ├── geometric.hpp │ │ ├── glm.hpp │ │ ├── gtc │ │ │ ├── bitfield.hpp │ │ │ ├── bitfield.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── constants.hpp │ │ │ ├── constants.inl │ │ │ ├── epsilon.hpp │ │ │ ├── epsilon.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── matrix_access.hpp │ │ │ ├── matrix_access.inl │ │ │ ├── matrix_integer.hpp │ │ │ ├── matrix_inverse.hpp │ │ │ ├── matrix_inverse.inl │ │ │ ├── matrix_transform.hpp │ │ │ ├── matrix_transform.inl │ │ │ ├── noise.hpp │ │ │ ├── noise.inl │ │ │ ├── packing.hpp │ │ │ ├── packing.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── quaternion_simd.inl │ │ │ ├── random.hpp │ │ │ ├── random.inl │ │ │ ├── reciprocal.hpp │ │ │ ├── reciprocal.inl │ │ │ ├── round.hpp │ │ │ ├── round.inl │ │ │ ├── type_aligned.hpp │ │ │ ├── type_precision.hpp │ │ │ ├── type_precision.inl │ │ │ ├── type_ptr.hpp │ │ │ ├── type_ptr.inl │ │ │ ├── ulp.hpp │ │ │ ├── ulp.inl │ │ │ └── vec1.hpp │ │ ├── gtx │ │ │ ├── associated_min_max.hpp │ │ │ ├── associated_min_max.inl │ │ │ ├── bit.hpp │ │ │ ├── bit.inl │ │ │ ├── closest_point.hpp │ │ │ ├── closest_point.inl │ │ │ ├── color_encoding.hpp │ │ │ ├── color_encoding.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── color_space_YCoCg.hpp │ │ │ ├── color_space_YCoCg.inl │ │ │ ├── common.hpp │ │ │ ├── common.inl │ │ │ ├── compatibility.hpp │ │ │ ├── compatibility.inl │ │ │ ├── component_wise.hpp │ │ │ ├── component_wise.inl │ │ │ ├── dual_quaternion.hpp │ │ │ ├── dual_quaternion.inl │ │ │ ├── easing.hpp │ │ │ ├── easing.inl │ │ │ ├── euler_angles.hpp │ │ │ ├── euler_angles.inl │ │ │ ├── extend.hpp │ │ │ ├── extend.inl │ │ │ ├── extended_min_max.hpp │ │ │ ├── extended_min_max.inl │ │ │ ├── exterior_product.hpp │ │ │ ├── exterior_product.inl │ │ │ ├── fast_exponential.hpp │ │ │ ├── fast_exponential.inl │ │ │ ├── fast_square_root.hpp │ │ │ ├── fast_square_root.inl │ │ │ ├── fast_trigonometry.hpp │ │ │ ├── fast_trigonometry.inl │ │ │ ├── float_notmalize.inl │ │ │ ├── functions.hpp │ │ │ ├── functions.inl │ │ │ ├── gradient_paint.hpp │ │ │ ├── gradient_paint.inl │ │ │ ├── handed_coordinate_space.hpp │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── hash.hpp │ │ │ ├── hash.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── intersect.hpp │ │ │ ├── intersect.inl │ │ │ ├── io.hpp │ │ │ ├── io.inl │ │ │ ├── log_base.hpp │ │ │ ├── log_base.inl │ │ │ ├── matrix_cross_product.hpp │ │ │ ├── matrix_cross_product.inl │ │ │ ├── matrix_decompose.hpp │ │ │ ├── matrix_decompose.inl │ │ │ ├── matrix_factorisation.hpp │ │ │ ├── matrix_factorisation.inl │ │ │ ├── matrix_interpolation.hpp │ │ │ ├── matrix_interpolation.inl │ │ │ ├── matrix_major_storage.hpp │ │ │ ├── matrix_major_storage.inl │ │ │ ├── matrix_operation.hpp │ │ │ ├── matrix_operation.inl │ │ │ ├── matrix_query.hpp │ │ │ ├── matrix_query.inl │ │ │ ├── matrix_transform_2d.hpp │ │ │ ├── matrix_transform_2d.inl │ │ │ ├── mixed_product.hpp │ │ │ ├── mixed_product.inl │ │ │ ├── norm.hpp │ │ │ ├── norm.inl │ │ │ ├── normal.hpp │ │ │ ├── normal.inl │ │ │ ├── normalize_dot.hpp │ │ │ ├── normalize_dot.inl │ │ │ ├── number_precision.hpp │ │ │ ├── number_precision.inl │ │ │ ├── optimum_pow.hpp │ │ │ ├── optimum_pow.inl │ │ │ ├── orthonormalize.hpp │ │ │ ├── orthonormalize.inl │ │ │ ├── perpendicular.hpp │ │ │ ├── perpendicular.inl │ │ │ ├── polar_coordinates.hpp │ │ │ ├── polar_coordinates.inl │ │ │ ├── projection.hpp │ │ │ ├── projection.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── range.hpp │ │ │ ├── raw_data.hpp │ │ │ ├── raw_data.inl │ │ │ ├── rotate_normalized_axis.hpp │ │ │ ├── rotate_normalized_axis.inl │ │ │ ├── rotate_vector.hpp │ │ │ ├── rotate_vector.inl │ │ │ ├── scalar_multiplication.hpp │ │ │ ├── scalar_relational.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── spline.hpp │ │ │ ├── spline.inl │ │ │ ├── std_based_type.hpp │ │ │ ├── std_based_type.inl │ │ │ ├── string_cast.hpp │ │ │ ├── string_cast.inl │ │ │ ├── texture.hpp │ │ │ ├── texture.inl │ │ │ ├── transform.hpp │ │ │ ├── transform.inl │ │ │ ├── transform2.hpp │ │ │ ├── transform2.inl │ │ │ ├── type_aligned.hpp │ │ │ ├── type_aligned.inl │ │ │ ├── type_trait.hpp │ │ │ ├── type_trait.inl │ │ │ ├── vec_swizzle.hpp │ │ │ ├── vector_angle.hpp │ │ │ ├── vector_angle.inl │ │ │ ├── vector_query.hpp │ │ │ ├── vector_query.inl │ │ │ ├── wrap.hpp │ │ │ └── wrap.inl │ │ ├── integer.hpp │ │ ├── mat2x2.hpp │ │ ├── mat2x3.hpp │ │ ├── mat2x4.hpp │ │ ├── mat3x2.hpp │ │ ├── mat3x3.hpp │ │ ├── mat3x4.hpp │ │ ├── mat4x2.hpp │ │ ├── mat4x3.hpp │ │ ├── mat4x4.hpp │ │ ├── matrix.hpp │ │ ├── packing.hpp │ │ ├── simd │ │ │ ├── common.h │ │ │ ├── exponential.h │ │ │ ├── geometric.h │ │ │ ├── integer.h │ │ │ ├── matrix.h │ │ │ ├── packing.h │ │ │ ├── platform.h │ │ │ ├── trigonometric.h │ │ │ └── vector_relational.h │ │ ├── trigonometric.hpp │ │ ├── vec2.hpp │ │ ├── vec3.hpp │ │ ├── vec4.hpp │ │ └── vector_relational.hpp │ └── rapidjson │ │ └── include │ │ └── rapidjson │ │ ├── allocators.h │ │ ├── cursorstreamwrapper.h │ │ ├── document.h │ │ ├── encodedstream.h │ │ ├── encodings.h │ │ ├── error │ │ ├── en.h │ │ └── error.h │ │ ├── filereadstream.h │ │ ├── filewritestream.h │ │ ├── fwd.h │ │ ├── internal │ │ ├── biginteger.h │ │ ├── clzll.h │ │ ├── diyfp.h │ │ ├── dtoa.h │ │ ├── ieee754.h │ │ ├── itoa.h │ │ ├── meta.h │ │ ├── pow10.h │ │ ├── regex.h │ │ ├── stack.h │ │ ├── strfunc.h │ │ ├── strtod.h │ │ └── swap.h │ │ ├── istreamwrapper.h │ │ ├── memorybuffer.h │ │ ├── memorystream.h │ │ ├── msinttypes │ │ ├── inttypes.h │ │ └── stdint.h │ │ ├── ostreamwrapper.h │ │ ├── pointer.h │ │ ├── prettywriter.h │ │ ├── rapidjson.h │ │ ├── reader.h │ │ ├── schema.h │ │ ├── stream.h │ │ ├── stringbuffer.h │ │ └── writer.h └── Source │ ├── Animation │ ├── AnimationClip.cpp │ ├── AnimationClip.h │ ├── AnimationInstance.cpp │ ├── AnimationInstance.h │ ├── AnimationSystem.cpp │ ├── AnimationSystem.h │ ├── Skeleton.cpp │ └── Skeleton.h │ ├── Application │ ├── BaseApplication.cpp │ └── BaseApplication.h │ ├── Core │ └── GearDefine.h │ ├── Entity │ ├── Components │ │ ├── CAnimation.cpp │ │ ├── CAnimation.h │ │ ├── CAtmosphere.cpp │ │ ├── CAtmosphere.h │ │ ├── CCamera.cpp │ │ ├── CCamera.h │ │ ├── CLight.cpp │ │ ├── CLight.h │ │ ├── CMesh.cpp │ │ ├── CMesh.h │ │ ├── CSkybox.cpp │ │ ├── CSkybox.h │ │ ├── CTransform.cpp │ │ ├── CTransform.h │ │ ├── Component.cpp │ │ └── Component.h │ ├── Entity.cpp │ ├── Entity.h │ ├── Scene.cpp │ └── Scene.h │ ├── GearEngine.cpp │ ├── GearEngine.h │ ├── Input │ ├── InputSystem.cpp │ └── InputSystem.h │ ├── JobSystem │ ├── JobSystem.cpp │ └── JobSystem.h │ ├── MaterialCompiler │ ├── CodeGenerator.cpp │ ├── CodeGenerator.h │ ├── MaterialCompiler.cpp │ ├── MaterialCompiler.h │ └── ShaderCode.h │ ├── Math │ ├── Geometry.cpp │ ├── Geometry.h │ └── Math.h │ ├── Renderer │ ├── AtmosphereRender.cpp │ ├── DebugPass.cpp │ ├── PostProcessPass.cpp │ ├── RenderCache.cpp │ ├── RenderCache.h │ ├── RenderData.cpp │ ├── RenderData.h │ ├── RenderUtility.cpp │ ├── Renderer.cpp │ ├── Renderer.h │ └── ShadowPass.cpp │ ├── Resource │ ├── BuiltinResources.cpp │ ├── BuiltinResources.h │ ├── Material.cpp │ ├── Material.h │ ├── Mesh.cpp │ ├── Mesh.h │ ├── Shader.cpp │ ├── Shader.h │ ├── Texture.cpp │ └── Texture.h │ ├── UI │ ├── Canvas.cpp │ └── Canvas.h │ ├── Utility │ ├── Event.h │ ├── FileSystem.cpp │ ├── FileSystem.h │ ├── Flags.h │ ├── Hash.cpp │ ├── Hash.h │ ├── Log.h │ ├── Module.h │ ├── Slice.h │ ├── UUID.cpp │ └── UUID.h │ ├── View │ ├── View.cpp │ └── View.h │ └── Window │ ├── BaseWindow.cpp │ └── BaseWindow.h ├── LICENSE ├── README.md ├── Screenshots ├── 3.png ├── Atmosphere1.png └── Atmosphere2.png └── Tools ├── GenShaderCode.py └── UpdateMaterialCode.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | /.vs 35 | /.vscode 36 | /GearEngine/.vs 37 | /GearEngine/Debug 38 | /GearEngine/GearEngine/Debug 39 | /GearEngine/Release 40 | *.tlog 41 | *.lnk 42 | *.vcxproj 43 | *.vcxproj.filters 44 | *.vcxproj.user 45 | .idea 46 | cmake-build-debug 47 | cmake-build-release -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Editor/External/glfw"] 2 | path = Editor/External/glfw 3 | url = https://github.com/glfw/glfw.git 4 | [submodule "Engine/External/Blast"] 5 | path = Engine/External/Blast 6 | url = https://github.com/hipiPan/Blast.git 7 | -------------------------------------------------------------------------------- /CMakeSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "x86-Debug", 5 | "generator": "Visual Studio 16 2019", 6 | "inheritEnvironments": [ "msvc_x86" ], 7 | "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", 8 | "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", 9 | "cmakeCommandArgs": "-DCMAKE_BUILD_TYPE=Debug", 10 | "ctestCommandArgs": "", 11 | "cmakeToolchain": "", 12 | "variables": [] 13 | }, 14 | { 15 | "name": "x86-Release", 16 | "generator": "Visual Studio 16 2019", 17 | "inheritEnvironments": [ "msvc_x86" ], 18 | "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", 19 | "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", 20 | "cmakeCommandArgs": "-DCMAKE_BUILD_TYPE=Release", 21 | "ctestCommandArgs": "", 22 | "cmakeToolchain": "", 23 | "variables": [] 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /Editor/BuiltinResources/Fonts/Roboto-License.txt: -------------------------------------------------------------------------------- 1 | Apache License, Version 2.0 2 | -------------------------------------------------------------------------------- /Editor/BuiltinResources/Fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/Fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/material_sphere/material_sphere.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/material_sphere/material_sphere.bin -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/scene.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/scene.bin -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/textures/Fire_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/textures/Fire_diffuse.png -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/textures/Fire_emissive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/textures/Fire_emissive.png -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_diffuse.png -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_emissive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_emissive.png -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_normal.png -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_occlusion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_occlusion.png -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_specularGlossiness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/mech_drone/textures/Robot_specularGlossiness.png -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/test.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/test.bin -------------------------------------------------------------------------------- /Editor/BuiltinResources/GltfFiles/transparency_test/transparency_test.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/GltfFiles/transparency_test/transparency_test.bin -------------------------------------------------------------------------------- /Editor/BuiltinResources/Materials/transparency_test.fs: -------------------------------------------------------------------------------- 1 | void ProcessMaterialFragmentParams(inout MaterialFragmentParams params) { 2 | params.metallic = 0.0; 3 | params.roughness = 1.0; 4 | params.base_color = vec4(0.1, 0.22, 0.6, 0.6); 5 | params.base_color.rgb *= params.base_color.a; 6 | } -------------------------------------------------------------------------------- /Editor/BuiltinResources/Materials/transparency_test.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "lit", 4 | "blending_mode": "transparent" 5 | }, 6 | "vertex_layout": [ 7 | "static_mesh" 8 | ], 9 | "fragment_file": "transparency_test.fs" 10 | } -------------------------------------------------------------------------------- /Editor/BuiltinResources/Materials/ui.fs: -------------------------------------------------------------------------------- 1 | void ProcessMaterialFragmentParams(inout MaterialFragmentParams params) { 2 | params.base_color = vertex_color * texture(sampler2D(albedo_texture, albedo_sampler), vertex_uv01.xy); 3 | params.base_color.rgb *= params.base_color.a; 4 | } -------------------------------------------------------------------------------- /Editor/BuiltinResources/Materials/ui.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "unlit", 4 | "blending_mode": "transparent" 5 | }, 6 | "vertex_layout": [ 7 | "ui" 8 | ], 9 | "textures": [ 10 | { 11 | "name": "albedo_texture", 12 | "type": "texture_2d" 13 | } 14 | ], 15 | "samplers": [ 16 | "albedo_sampler" 17 | ], 18 | "fragment_file": "ui.fs" 19 | } -------------------------------------------------------------------------------- /Editor/BuiltinResources/Textures/Ridgecrest_Road_Ref.hdr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/Textures/Ridgecrest_Road_Ref.hdr -------------------------------------------------------------------------------- /Editor/BuiltinResources/Textures/skybox_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/Textures/skybox_0.jpg -------------------------------------------------------------------------------- /Editor/BuiltinResources/Textures/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/BuiltinResources/Textures/test.png -------------------------------------------------------------------------------- /Editor/External/cgltf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Johannes Kuhlmann 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /Editor/External/imgui/.editorconfig: -------------------------------------------------------------------------------- 1 | # See http://editorconfig.org to read about the EditorConfig format. 2 | # - In theory automatically supported by VS2017+ and most common IDE or text editors. 3 | # - In practice VS2019-VS2022 stills don't trim trailing whitespaces correctly :( 4 | # - Suggest installing this to trim whitespaces: 5 | # GitHub https://github.com/madskristensen/TrailingWhitespace 6 | # VS2019 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespaceVisualizer 7 | # VS2022 https://marketplace.visualstudio.com/items?itemName=MadsKristensen.TrailingWhitespace64 8 | # (in spite of its name doesn't only visualize but also trims) 9 | # - Alternative for older VS2010 to VS2015: https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig 10 | 11 | # top-most EditorConfig file 12 | root = true 13 | 14 | # Default settings: 15 | # Use 4 spaces as indentation 16 | [*] 17 | indent_style = space 18 | indent_size = 4 19 | insert_final_newline = true 20 | trim_trailing_whitespace = true 21 | 22 | [imstb_*] 23 | indent_size = 3 24 | trim_trailing_whitespace = false 25 | 26 | [Makefile] 27 | indent_style = tab 28 | indent_size = 4 29 | -------------------------------------------------------------------------------- /Editor/External/imgui/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.c text 4 | *.cpp text 5 | *.h text 6 | *.m text 7 | *.mm text 8 | *.md text 9 | *.txt text 10 | *.html text 11 | *.bat text 12 | *.frag text 13 | *.vert text 14 | *.mkb text 15 | *.icf text 16 | 17 | *.sln text eol=crlf 18 | *.vcxproj text eol=crlf 19 | *.vcxproj.filters text eol=crlf 20 | *.natvis text eol=crlf 21 | 22 | Makefile text eol=lf 23 | *.sh text eol=lf 24 | *.pbxproj text eol=lf 25 | *.storyboard text eol=lf 26 | *.plist text eol=lf 27 | 28 | *.png binary 29 | *.ttf binary 30 | *.lib binary 31 | -------------------------------------------------------------------------------- /Editor/External/imgui/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://github.com/ocornut/imgui/wiki/Sponsors'] 2 | -------------------------------------------------------------------------------- /Editor/External/imgui/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | (Click "Preview" to turn any http URL into a clickable link) 2 | 3 | PLEASE CAREFULLY READ: 4 | https://github.com/ocornut/imgui/issues/2261 5 | 6 | (Clear this template before submitting your PR) 7 | -------------------------------------------------------------------------------- /Editor/External/imgui/.github/workflows/scheduled.yml: -------------------------------------------------------------------------------- 1 | # 2 | # This is a dummy workflow used to trigger scheduled builds. Forked repositories most likely should disable this 3 | # workflow to avoid daily builds of inactive repositories. 4 | # 5 | name: scheduled 6 | 7 | on: 8 | schedule: 9 | - cron: '0 9 * * *' 10 | 11 | jobs: 12 | scheduled: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - run: exit 0 16 | -------------------------------------------------------------------------------- /Editor/External/imgui/.gitignore: -------------------------------------------------------------------------------- 1 | ## OSX artifacts 2 | .DS_Store 3 | 4 | ## Dear ImGui artifacts 5 | imgui.ini 6 | 7 | ## General build artifacts 8 | *.o 9 | *.obj 10 | *.exe 11 | examples/build/* 12 | examples/*/Debug/* 13 | examples/*/Release/* 14 | examples/*/x64/* 15 | 16 | ## Visual Studio artifacts 17 | .vs 18 | ipch 19 | *.opensdf 20 | *.log 21 | *.pdb 22 | *.ilk 23 | *.user 24 | *.sdf 25 | *.suo 26 | *.VC.db 27 | *.VC.VC.opendb 28 | 29 | ## Commonly used CMake directories 30 | /build*/ 31 | 32 | ## Xcode artifacts 33 | project.xcworkspace 34 | xcuserdata 35 | 36 | ## Emscripten artifacts 37 | examples/*.o.tmp 38 | examples/*.out.js 39 | examples/*.out.wasm 40 | examples/example_emscripten_opengl3/web/* 41 | examples/example_emscripten_wgpu/web/* 42 | 43 | ## JetBrains IDE artifacts 44 | .idea 45 | cmake-build-* 46 | 47 | ## Unix executables from our example Makefiles 48 | examples/example_glfw_metal/example_glfw_metal 49 | examples/example_glfw_opengl2/example_glfw_opengl2 50 | examples/example_glfw_opengl3/example_glfw_opengl3 51 | examples/example_glut_opengl2/example_glut_opengl2 52 | examples/example_null/example_null 53 | examples/example_sdl_metal/example_sdl_metal 54 | examples/example_sdl_opengl2/example_sdl_opengl2 55 | examples/example_sdl_opengl3/example_sdl_opengl3 56 | examples/example_sdl_sdlrenderer/example_sdl_sdlrenderer 57 | -------------------------------------------------------------------------------- /Editor/External/imgui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | project(imgui) 3 | 4 | set(IMGUI_INC 5 | ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h 6 | ${CMAKE_CURRENT_SOURCE_DIR}/imgui.h 7 | ${CMAKE_CURRENT_SOURCE_DIR}/imgui_internal.h 8 | ${CMAKE_CURRENT_SOURCE_DIR}/imstb_rectpack.h 9 | ${CMAKE_CURRENT_SOURCE_DIR}/imstb_textedit.h 10 | ${CMAKE_CURRENT_SOURCE_DIR}/imstb_truetype.h 11 | ) 12 | 13 | set(IMGUI_SRC 14 | ${CMAKE_CURRENT_SOURCE_DIR}/imgui.cpp 15 | ${CMAKE_CURRENT_SOURCE_DIR}/imgui_demo.cpp 16 | ${CMAKE_CURRENT_SOURCE_DIR}/imgui_draw.cpp 17 | ${CMAKE_CURRENT_SOURCE_DIR}/imgui_widgets.cpp 18 | ${CMAKE_CURRENT_SOURCE_DIR}/imgui_tables.cpp 19 | ) 20 | 21 | add_library(imgui STATIC) 22 | 23 | target_include_directories(imgui PUBLIC ${IMGUI_INC}) 24 | 25 | target_sources(imgui PUBLIC ${IMGUI_INC} ${IMGUI_SRC}) 26 | -------------------------------------------------------------------------------- /Editor/External/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2023 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Editor/External/imgui/misc/README.txt: -------------------------------------------------------------------------------- 1 | 2 | misc/cpp/ 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | misc/debuggers/ 7 | Helper files for popular debuggers. 8 | With the .natvis file, types like ImVector<> will be displayed nicely in Visual Studio debugger. 9 | 10 | misc/fonts/ 11 | Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). 12 | Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. 13 | Suggested fonts and links. 14 | 15 | misc/freetype/ 16 | Font atlas builder/rasterizer using FreeType instead of stb_truetype. 17 | Benefit from better FreeType rasterization, in particular for small fonts. 18 | 19 | misc/single_file/ 20 | Single-file header stub. 21 | We use this to validate compiling all *.cpp files in a same compilation unit. 22 | Users of that technique (also called "Unity builds") can generally provide this themselves, 23 | so we don't really recommend you use this in your projects. 24 | -------------------------------------------------------------------------------- /Editor/External/imgui/misc/cpp/README.txt: -------------------------------------------------------------------------------- 1 | 2 | imgui_stdlib.h + imgui_stdlib.cpp 3 | InputText() wrappers for C++ standard library (STL) type: std::string. 4 | This is also an example of how you may wrap your own similar types. 5 | 6 | imgui_scoped.h 7 | [Experimental, not currently in main repository] 8 | Additional header file with some RAII-style wrappers for common Dear ImGui functions. 9 | Try by merging: https://github.com/ocornut/imgui/pull/2197 10 | Discuss at: https://github.com/ocornut/imgui/issues/2096 11 | -------------------------------------------------------------------------------- /Editor/External/imgui/misc/cpp/imgui_stdlib.h: -------------------------------------------------------------------------------- 1 | // dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.) 2 | // This is also an example of how you may wrap your own similar types. 3 | 4 | // Compatibility: 5 | // - std::string support is only guaranteed to work from C++11. 6 | // If you try to use it pre-C++11, please share your findings (w/ info about compiler/architecture) 7 | 8 | // Changelog: 9 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string 10 | 11 | #pragma once 12 | 13 | #include 14 | 15 | namespace ImGui 16 | { 17 | // ImGui::InputText() with std::string 18 | // Because text input needs dynamic resizing, we need to setup a callback to grow the capacity 19 | IMGUI_API bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 20 | IMGUI_API bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 21 | IMGUI_API bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL); 22 | } 23 | -------------------------------------------------------------------------------- /Editor/External/imgui/misc/debuggers/README.txt: -------------------------------------------------------------------------------- 1 | 2 | HELPER FILES FOR POPULAR DEBUGGERS 3 | 4 | imgui.gdb 5 | GDB: disable stepping into trivial functions. 6 | (read comments inside file for details) 7 | 8 | imgui.natstepfilter 9 | Visual Studio Debugger: disable stepping into trivial functions. 10 | (read comments inside file for details) 11 | 12 | imgui.natvis 13 | Visual Studio Debugger: describe Dear ImGui types for better display. 14 | With this, types like ImVector<> will be displayed nicely in the debugger. 15 | (read comments inside file for details) 16 | 17 | -------------------------------------------------------------------------------- /Editor/External/imgui/misc/debuggers/imgui.gdb: -------------------------------------------------------------------------------- 1 | # GDB configuration to aid debugging experience 2 | 3 | # To enable these customizations edit $HOME/.gdbinit (or ./.gdbinit if local gdbinit is enabled) and add: 4 | # add-auto-load-safe-path /path/to/imgui.gdb 5 | # source /path/to/imgui.gdb 6 | # 7 | # More Information at: 8 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/gdbinit-man.html 9 | # * https://sourceware.org/gdb/current/onlinedocs/gdb/Init-File-in-the-Current-Directory.html#Init-File-in-the-Current-Directory 10 | 11 | # Disable stepping into trivial functions 12 | skip -rfunction Im(Vec2|Vec4|Strv|Vector|Span)::.+ 13 | -------------------------------------------------------------------------------- /Editor/External/imgui/misc/debuggers/imgui.natstepfilter: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | (ImVec2|ImVec4|ImStrv)::.+ 23 | NoStepInto 24 | 25 | 26 | (ImVector|ImSpan).*::operator.+ 27 | NoStepInto 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Editor/External/imgui/misc/fonts/Cousine-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/External/imgui/misc/fonts/Cousine-Regular.ttf -------------------------------------------------------------------------------- /Editor/External/imgui/misc/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/External/imgui/misc/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /Editor/External/imgui/misc/fonts/Karla-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/External/imgui/misc/fonts/Karla-Regular.ttf -------------------------------------------------------------------------------- /Editor/External/imgui/misc/fonts/ProggyClean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/External/imgui/misc/fonts/ProggyClean.ttf -------------------------------------------------------------------------------- /Editor/External/imgui/misc/fonts/ProggyTiny.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/External/imgui/misc/fonts/ProggyTiny.ttf -------------------------------------------------------------------------------- /Editor/External/imgui/misc/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Editor/External/imgui/misc/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /Editor/External/imgui/misc/single_file/imgui_single_file.h: -------------------------------------------------------------------------------- 1 | // dear imgui: single-file wrapper include 2 | // We use this to validate compiling all *.cpp files in a same compilation unit. 3 | // Users of that technique (also called "Unity builds") can generally provide this themselves, 4 | // so we don't really recommend you use this in your projects. 5 | 6 | // Do this: 7 | // #define IMGUI_IMPLEMENTATION 8 | // Before you include this file in *one* C++ file to create the implementation. 9 | // Using this in your project will leak the contents of imgui_internal.h and ImVec2 operators in this compilation unit. 10 | #include "../../imgui.h" 11 | 12 | #ifdef IMGUI_IMPLEMENTATION 13 | #include "../../imgui.cpp" 14 | #include "../../imgui_demo.cpp" 15 | #include "../../imgui_draw.cpp" 16 | #include "../../imgui_tables.cpp" 17 | #include "../../imgui_widgets.cpp" 18 | #endif 19 | -------------------------------------------------------------------------------- /Editor/External/xatlas/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2020 Jonathan Young 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Editor/Source/CameraController.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace gear { 6 | class Entity; 7 | } 8 | 9 | class CameraController { 10 | public: 11 | CameraController(); 12 | 13 | ~CameraController(); 14 | 15 | void SetCamera(gear::Entity* camera); 16 | 17 | private: 18 | void Begin(int x, int y) { 19 | _grabbing = true; 20 | _start_point = glm::vec2(x, y); 21 | } 22 | 23 | void End() { 24 | _grabbing = false; 25 | } 26 | 27 | void OnMousePosition(float x, float y); 28 | 29 | void OnMouseButton(int button, int action); 30 | 31 | void OnMouseScroll(float offset); 32 | 33 | private: 34 | gear::Entity* _camera = nullptr; 35 | bool _grabbing = false; 36 | glm::vec2 _start_point; 37 | EventHandle _on_mouse_position_handle; 38 | EventHandle _on_mouse_button_handle; 39 | EventHandle _on_mouse_scroll_handle; 40 | }; -------------------------------------------------------------------------------- /Editor/Source/EditorMisc.cpp: -------------------------------------------------------------------------------- 1 | #include "EditorMisc.h" 2 | #include 3 | 4 | namespace EditorMisc { 5 | const std::string GetEditorResourcesDir() { 6 | static std::string editor_resources_dir = ""; 7 | if (editor_resources_dir == "") { 8 | filesystem::path root_path = filesystem::path::getcwd(); 9 | editor_resources_dir = (root_path / "EditorResources").str(filesystem::path::path_type::posix_path); 10 | } 11 | return editor_resources_dir; 12 | } 13 | 14 | const std::string GetEngineResourcesDir() { 15 | static std::string engine_resources_dir = ""; 16 | if (engine_resources_dir == "") { 17 | filesystem::path root_path = filesystem::path::getcwd(); 18 | engine_resources_dir = (root_path / "EngineResources").str(filesystem::path::path_type::posix_path); 19 | } 20 | return engine_resources_dir; 21 | } 22 | }; -------------------------------------------------------------------------------- /Editor/Source/EditorMisc.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace EditorMisc { 6 | const std::string GetEditorResourcesDir(); 7 | 8 | const std::string GetEngineResourcesDir(); 9 | }; 10 | -------------------------------------------------------------------------------- /Editor/Source/GltfImporter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | namespace gear { 11 | class Entity; 12 | class Mesh; 13 | class Material; 14 | class MaterialInstance; 15 | class Skeleton; 16 | class AnimationClip; 17 | } 18 | 19 | struct GltfAsset { 20 | std::unordered_map> textures; 21 | std::unordered_map> meshs; 22 | std::unordered_map> materials; 23 | std::unordered_map> material_instances; 24 | std::unordered_map> skeletons; 25 | std::unordered_map> animation_clips; 26 | std::unordered_map> entities; 27 | }; 28 | 29 | struct alignas(4) GltfMaterialConfig { 30 | gear::BlendStateType blending_mode; 31 | bool has_base_color_tex = false; 32 | bool has_normal_tex = false; 33 | bool has_metallic_roughness_tex = false; 34 | struct Eq { 35 | bool operator()(const GltfMaterialConfig& c0, const GltfMaterialConfig& c1) const; 36 | }; 37 | }; 38 | 39 | GltfAsset* ImportGltfAsset(const std::string&); 40 | 41 | void DestroyGltfAsset(GltfAsset* asset); -------------------------------------------------------------------------------- /Editor/Source/TestScene/MaterialTestScene.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "TestScene.h" 4 | #include "../GltfImporter.h" 5 | #include "../TextureImporter.h" 6 | #include "../CameraController.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | class MaterialTestScene : public TestScene { 21 | public: 22 | MaterialTestScene(); 23 | 24 | virtual ~MaterialTestScene(); 25 | 26 | void Load() override; 27 | 28 | void Clear() override; 29 | 30 | void DrawUI() override; 31 | 32 | std::shared_ptr GetScene() override; 33 | 34 | protected: 35 | std::shared_ptr scene = nullptr; 36 | std::shared_ptr main_camera = nullptr; 37 | std::shared_ptr sun = nullptr; 38 | std::shared_ptr ibl = nullptr; 39 | std::shared_ptr skybox_map = nullptr; 40 | std::shared_ptr irradiance_map = nullptr; 41 | std::shared_ptr prefiltered_map = nullptr; 42 | std::shared_ptr brdf_lut = nullptr; 43 | GltfAsset* gltf_asset = nullptr; 44 | CameraController* camera_controller = nullptr; 45 | }; 46 | -------------------------------------------------------------------------------- /Editor/Source/TestScene/SkyAtmosphereTestScene.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "TestScene.h" 4 | #include "../GltfImporter.h" 5 | #include "../TextureImporter.h" 6 | #include "../CameraController.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | class SkyAtmosphereTestScene : public TestScene { 21 | public: 22 | SkyAtmosphereTestScene(); 23 | 24 | virtual ~SkyAtmosphereTestScene(); 25 | 26 | void Load() override; 27 | 28 | void Clear() override; 29 | 30 | void DrawUI() override; 31 | 32 | std::shared_ptr GetScene() override; 33 | 34 | protected: 35 | std::shared_ptr scene = nullptr; 36 | std::shared_ptr main_camera = nullptr; 37 | std::shared_ptr sun = nullptr; 38 | GltfAsset* gltf_asset = nullptr; 39 | CameraController* camera_controller = nullptr; 40 | }; 41 | -------------------------------------------------------------------------------- /Editor/Source/TestScene/TestScene.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class TestScene { 6 | public: 7 | TestScene() = default; 8 | 9 | virtual ~TestScene() = default; 10 | 11 | virtual void Load() = 0; 12 | 13 | virtual void Clear() = 0; 14 | 15 | virtual void DrawUI() = 0; 16 | 17 | virtual std::shared_ptr GetScene() = 0; 18 | }; 19 | -------------------------------------------------------------------------------- /Editor/Source/TextureImporter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace blast { 6 | class GfxTexture; 7 | } 8 | 9 | std::shared_ptr ImportTexture2D(const std::string&); 10 | 11 | std::shared_ptr ImportTexture2DWithFloat(const std::string&); -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/blit.fs: -------------------------------------------------------------------------------- 1 | void ProcessMaterialFragmentParams(inout MaterialFragmentParams params) { 2 | params.base_color.rgba = texture(sampler2D(src_texture, blit_sampler), vertex_uv01.xy); 3 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/blit.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "unlit", 4 | "blending_mode": "transparent" 5 | }, 6 | "vertex_layout": [ 7 | "p_t0" 8 | ], 9 | "textures": [ 10 | { 11 | "name": "src_texture", 12 | "type": "texture_2d" 13 | } 14 | ], 15 | "samplers": [ 16 | "blit_sampler" 17 | ], 18 | "fragment_file": "blit.fs" 19 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/debug.fs: -------------------------------------------------------------------------------- 1 | void ProcessMaterialFragmentParams(inout MaterialFragmentParams params) { 2 | params.base_color = vertex_color; 3 | params.base_color.rgb *= params.base_color.a; 4 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/debug.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "unlit", 4 | "blending_mode": "opaque" 5 | }, 6 | "vertex_layout": [ 7 | "debug" 8 | ], 9 | "fragment_file" : "debug.fs" 10 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/equirectangular_to_cube.fs: -------------------------------------------------------------------------------- 1 | vec2 SampleSphericalMap(vec3 v) { 2 | vec2 inv_atan = vec2(0.1591, 0.3183); 3 | vec2 uv = vec2(atan(v.z, v.x), asin(v.y)); 4 | uv *= inv_atan; 5 | uv += 0.5; 6 | return uv; 7 | } 8 | 9 | void ProcessMaterialFragmentParams(inout MaterialFragmentParams params) { 10 | 11 | vec2 uv = SampleSphericalMap(normalize(vertex_world_position)); 12 | params.base_color.rgb = texture(sampler2D(equirectangular_map, equirectangular_sampler), uv).rgb; 13 | params.base_color.a = 1.0; 14 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/equirectangular_to_cube.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "unlit", 4 | "blending_mode": "opaque" 5 | }, 6 | "vertex_layout": [ 7 | "p" 8 | ], 9 | "textures": [ 10 | { 11 | "name": "equirectangular_map", 12 | "type": "texture_2d" 13 | } 14 | ], 15 | "samplers": [ 16 | "equirectangular_sampler" 17 | ], 18 | "fragment_file": "equirectangular_to_cube.fs" 19 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/fxaa.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "unlit", 4 | "blending_mode": "transparent" 5 | }, 6 | "vertex_layout": [ 7 | "p_t0" 8 | ], 9 | "textures": [ 10 | { 11 | "name": "fxaa_texture", 12 | "type": "texture_2d" 13 | } 14 | ], 15 | "samplers": [ 16 | "fxaa_sampler" 17 | ], 18 | "fragment_file": "fxaa.fs" 19 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/skybox.fs: -------------------------------------------------------------------------------- 1 | void ProcessMaterialFragmentParams(inout MaterialFragmentParams params) { 2 | params.base_color.rgb = texture(samplerCube(skybox_map, skybox_sampler), vertex_world_position).rgb; 3 | params.base_color.a = 1.0; 4 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/skybox.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "unlit", 4 | "blending_mode": "opaque" 5 | }, 6 | "vertex_layout": [ 7 | "p" 8 | ], 9 | "textures": [ 10 | { 11 | "name": "skybox_map", 12 | "type": "texture_cube" 13 | } 14 | ], 15 | "samplers": [ 16 | "skybox_sampler" 17 | ], 18 | "fragment_file": "skybox.fs" 19 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/ui.fs: -------------------------------------------------------------------------------- 1 | void ProcessMaterialFragmentParams(inout MaterialFragmentParams params) { 2 | params.base_color = vertex_color * texture(sampler2D(albedo_texture, albedo_sampler), vertex_uv01.xy); 3 | params.base_color.rgb *= params.base_color.a; 4 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Materials/ui.mat: -------------------------------------------------------------------------------- 1 | { 2 | "state": { 3 | "shading_model": "unlit", 4 | "blending_mode": "transparent" 5 | }, 6 | "vertex_layout": [ 7 | "ui" 8 | ], 9 | "textures": [ 10 | { 11 | "name": "albedo_texture", 12 | "type": "texture_2d" 13 | } 14 | ], 15 | "samplers": [ 16 | "albedo_sampler" 17 | ], 18 | "fragment_file": "ui.fs" 19 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/Atmosphere/atmosphere_comon.vs: -------------------------------------------------------------------------------- 1 | #version 450 2 | #extension GL_ARB_separate_shader_objects : enable 3 | 4 | layout(location = 0) in vec2 vertex; 5 | 6 | void main() { 7 | gl_Position = vec4(vertex, 0.0, 1.0); 8 | gl_Position.y = -gl_Position.y; 9 | } 10 | -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/brdf.fs: -------------------------------------------------------------------------------- 1 | float D_GGX(float roughness, float NoH) { 2 | float a = NoH * roughness; 3 | float k = roughness / (1.0 - NoH * NoH + a * a); 4 | float d = k * k * (1.0 / PI); 5 | return saturate(d); 6 | } 7 | 8 | float V_SmithGGXCorrelated(float roughness, float NoV, float NoL) { 9 | float a2 = roughness * roughness; 10 | float GGXV = NoL * sqrt((NoV - a2 * NoV) * NoV + a2); 11 | float GGXL = NoV * sqrt((NoL - a2 * NoL) * NoL + a2); 12 | float v = 0.5 / (GGXV + GGXL); 13 | return saturate(v); 14 | } 15 | 16 | vec3 F_Schlick(const vec3 f0, float VoH) { 17 | // f90 = 1.0 18 | float f = pow(1.0 - VoH, 5.0); 19 | return f + f0 * (1.0 - f); 20 | } 21 | 22 | float Distribution(float roughness, float NoH, const vec3 H) { 23 | return D_GGX(roughness, NoH); 24 | } 25 | 26 | float Visibility(float roughness, float NoV, float NoL) { 27 | return V_SmithGGXCorrelated(roughness, NoV, NoL); 28 | } 29 | 30 | vec3 Fresnel(const vec3 f0, float LoH) { 31 | return F_Schlick(f0, LoH); 32 | } 33 | 34 | float Diffuse(float roughness, float NoV, float NoL, float LoH) { 35 | // Todo: Burley Diffuse 36 | return 1.0 / PI; 37 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/depth_main.fs: -------------------------------------------------------------------------------- 1 | void main() { 2 | } 3 | -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/depth_main.vs: -------------------------------------------------------------------------------- 1 | void main() { 2 | MaterialVertexParams material_params; 3 | 4 | InitMaterialVertexParams(material_params); 5 | 6 | ProcessMaterialVertexParams(material_params); 7 | 8 | vec4 world_position = material_params.world_position; 9 | #if defined(HAS_SKINNING_OR_MORPHING) && defined(HAS_ATTRIBUTE_BONE_INDICES) 10 | mat4 skin_matrix = 11 | mesh_bone_weights.x * bone_uniforms.joint_matrixs[int(mesh_bone_indices.x)] + 12 | mesh_bone_weights.y * bone_uniforms.joint_matrixs[int(mesh_bone_indices.y)] + 13 | mesh_bone_weights.z * bone_uniforms.joint_matrixs[int(mesh_bone_indices.z)] + 14 | mesh_bone_weights.w * bone_uniforms.joint_matrixs[int(mesh_bone_indices.w)]; 15 | 16 | world_position = object_uniforms.model_matrix * skin_matrix * mesh_position; 17 | #endif 18 | 19 | gl_Position = frame_uniforms.proj_matrix * frame_uniforms.view_matrix * world_position; 20 | } 21 | -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/inputs.fs: -------------------------------------------------------------------------------- 1 | layout(location = 0) in highp vec3 vertex_world_position; 2 | 3 | #if defined(HAS_ATTRIBUTE_UV0) && !defined(HAS_ATTRIBUTE_UV1) 4 | layout(location = 5) in highp vec2 vertex_uv01; 5 | #elif defined(HAS_ATTRIBUTE_UV1) 6 | layout(location = 5) in highp vec4 vertex_uv01; 7 | #endif 8 | 9 | #if defined(HAS_ATTRIBUTE_NORMAL) 10 | layout(location = 6) in highp vec3 vertex_normal; 11 | #endif 12 | 13 | #if defined(HAS_ATTRIBUTE_COLOR) 14 | layout(location = 7) in mediump vec4 vertex_color; 15 | #endif -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/light_indirect.fs: -------------------------------------------------------------------------------- 1 | vec3 FresnelSchlickRoughness(float cos_theta, vec3 F0, float roughness) { 2 | return F0 + (max(vec3(1.0 - roughness), F0) - F0) * pow(1.0 - cos_theta, 5.0); 3 | } 4 | 5 | #if defined(HAS_IBL) 6 | void EvaluateIBL(const MaterialFragmentParams material_params, inout vec3 color) { 7 | #if defined(HAS_ATTRIBUTE_NORMAL) 8 | // Todo: Flexible f0 9 | vec3 F0 = vec3(material_params.metallic); 10 | vec3 N = normalize(vertex_normal); 11 | vec3 V = normalize(frame_uniforms.view_position.xyz - vertex_world_position); 12 | vec3 R = reflect(-V, N); 13 | vec3 F = FresnelSchlickRoughness(max(dot(N, V), 0.0), F0, material_params.roughness); 14 | vec3 kS = F; 15 | vec3 kD = vec3(1.0) - kS; 16 | kD *= 1.0 - material_params.metallic; 17 | 18 | vec3 irradiance = texture(samplerCube(irradiance_map, ibl_sampler), N).rgb; 19 | vec3 diffuse = kD * irradiance * material_params.base_color.rgb; 20 | 21 | vec3 prefiltered_color = textureLod(samplerCube(prefiltered_map, ibl_sampler), R, uint(material_params.roughness * 4)).rgb; 22 | vec2 brdf = texture(sampler2D(brdf_lut, ibl_sampler), vec2(max(dot(N, V), 0.0), material_params.roughness)).rg; 23 | vec3 specular = prefiltered_color * (F * brdf.x + brdf.y); 24 | vec3 ambient = diffuse + specular; 25 | 26 | color += ambient * 0.3; 27 | #endif 28 | } 29 | #endif -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/light_punctual.fs: -------------------------------------------------------------------------------- 1 | void EvaluatePunctualLights(const MaterialFragmentParams material_params, inout vec3 color) { 2 | 3 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/main.fs: -------------------------------------------------------------------------------- 1 | layout(location = 0) out vec4 fragColor; 2 | 3 | void PrepareShadingParams() { 4 | shading_view = normalize(frame_uniforms.view_position.xyz - vertex_world_position); 5 | 6 | #if defined(HAS_ATTRIBUTE_NORMAL) 7 | shading_normal = vertex_normal; 8 | #endif 9 | } 10 | 11 | void main() { 12 | PrepareShadingParams(); 13 | 14 | MaterialFragmentParams material_params; 15 | 16 | InitMaterialFragmentParams(material_params); 17 | 18 | ProcessMaterialFragmentParams(material_params); 19 | 20 | fragColor = EvaluateMaterial(material_params); 21 | } 22 | -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/main.vs: -------------------------------------------------------------------------------- 1 | void main() { 2 | MaterialVertexParams material_params; 3 | 4 | InitMaterialVertexParams(material_params); 5 | 6 | ProcessMaterialVertexParams(material_params); 7 | 8 | vec4 world_position = material_params.world_position; 9 | #if defined(HAS_SKINNING_OR_MORPHING) && defined(HAS_ATTRIBUTE_BONE_INDICES) 10 | mat4 skin_matrix = 11 | mesh_bone_weights.x * bone_uniforms.joint_matrixs[int(mesh_bone_indices.x)] + 12 | mesh_bone_weights.y * bone_uniforms.joint_matrixs[int(mesh_bone_indices.y)] + 13 | mesh_bone_weights.z * bone_uniforms.joint_matrixs[int(mesh_bone_indices.z)] + 14 | mesh_bone_weights.w * bone_uniforms.joint_matrixs[int(mesh_bone_indices.w)]; 15 | 16 | world_position = object_uniforms.model_matrix * skin_matrix * mesh_position; 17 | #endif 18 | 19 | vertex_position = frame_uniforms.view_matrix * world_position; 20 | 21 | vertex_world_position = world_position.xyz; 22 | 23 | #if defined(HAS_ATTRIBUTE_UV0) 24 | vertex_uv01.xy = material_params.uv0; 25 | #endif 26 | #if defined(HAS_ATTRIBUTE_UV1) 27 | vertex_uv01.zw = material_params.uv1; 28 | #endif 29 | 30 | #if defined(HAS_ATTRIBUTE_COLOR) 31 | vertex_color = material_params.color; 32 | #endif 33 | 34 | #if defined(HAS_ATTRIBUTE_NORMAL) 35 | vertex_normal = material_params.world_normal; 36 | #endif 37 | 38 | gl_Position = frame_uniforms.proj_matrix * frame_uniforms.view_matrix * world_position; 39 | } 40 | -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/material_params.fs: -------------------------------------------------------------------------------- 1 | struct MaterialFragmentParams { 2 | vec4 base_color; 3 | vec3 specular_color; 4 | float roughness; 5 | float metallic; 6 | }; 7 | 8 | void InitMaterialFragmentParams(out MaterialFragmentParams params) { 9 | params.base_color = vec4(1.0); 10 | params.roughness = 0.5; 11 | params.metallic = 0.5; 12 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/material_params.vs: -------------------------------------------------------------------------------- 1 | struct MaterialVertexParams { 2 | vec4 world_position; 3 | 4 | #ifdef HAS_ATTRIBUTE_NORMAL 5 | vec3 world_normal; 6 | #endif 7 | 8 | #ifdef HAS_ATTRIBUTE_COLOR 9 | vec4 color; 10 | #endif 11 | 12 | #ifdef HAS_ATTRIBUTE_UV0 13 | vec2 uv0; 14 | #endif 15 | 16 | #ifdef HAS_ATTRIBUTE_UV1 17 | vec2 uv1; 18 | #endif 19 | }; 20 | 21 | void InitMaterialVertexParams(out MaterialVertexParams params) { 22 | params.world_position = object_uniforms.model_matrix * mesh_position; 23 | 24 | #ifdef HAS_ATTRIBUTE_COLOR 25 | params.color = mesh_color; 26 | #endif 27 | 28 | #ifdef HAS_ATTRIBUTE_UV0 29 | params.uv0 = mesh_uv0; 30 | #endif 31 | 32 | #ifdef HAS_ATTRIBUTE_UV1 33 | params.uv1 = mesh_uv1; 34 | #endif 35 | 36 | #ifdef HAS_ATTRIBUTE_NORMAL 37 | params.world_normal = normalize(mat3(object_uniforms.normal_matrix) * mesh_normal); 38 | #endif 39 | } 40 | -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/shading_lit.fs: -------------------------------------------------------------------------------- 1 | vec4 EvaluateLights(const MaterialFragmentParams material_params) { 2 | vec3 color = vec3(0.0); 3 | 4 | #if defined(HAS_DIRECTIONAL_LIGHTING) 5 | EvaluateDirectionalLight(material_params, color); 6 | #endif 7 | 8 | #if defined(HAS_DYNAMIC_LIGHTING) 9 | EvaluatePunctualLights(material_params, color); 10 | #endif 11 | 12 | #if defined(HAS_IBL) 13 | EvaluateIBL(material_params, color); 14 | #endif 15 | 16 | return vec4(color, material_params.base_color.a); 17 | } 18 | 19 | vec4 EvaluateMaterial(const MaterialFragmentParams material_params) { 20 | vec4 color = EvaluateLights(material_params); 21 | return color; 22 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/shading_model_standard.fs: -------------------------------------------------------------------------------- 1 | 2 | vec3 SpecularLobe(const MaterialFragmentParams params, vec3 H, float NoV, float NoL, float NoH, float LoH) { 3 | // Todo: Flexible f0 4 | float D = Distribution(params.roughness, NoH, H); 5 | float G = Visibility(params.roughness, NoV, NoL); 6 | vec3 F = Fresnel(vec3(params.metallic), LoH); 7 | return (D * G * F) / (4.0 * max(NoV, 0.0) * max(NoL, 0.0) + 0.001); 8 | } 9 | 10 | vec3 DiffuseLobe(const MaterialFragmentParams params, float NoV, float NoL, float LoH) { 11 | vec3 diffuse_color = params.base_color.rgb * (1.0 - params.metallic); 12 | return diffuse_color * Diffuse(params.roughness, NoV, NoL, LoH); 13 | } 14 | 15 | vec3 SurfaceShading(const MaterialFragmentParams params, const Light light, float visibility) { 16 | vec3 H = normalize(shading_view + light.L); 17 | float NoV = saturate(dot(shading_normal, shading_view)); 18 | float NoL = saturate(dot(shading_normal, light.L)); 19 | float NoH = saturate(dot(shading_normal, H)); 20 | float LoH = saturate(dot(light.L, H)); 21 | 22 | vec3 Fr = SpecularLobe(params, H, NoV, NoL, NoH, LoH); 23 | vec3 Fd = DiffuseLobe(params, NoV, NoL, LoH); 24 | 25 | vec3 color = Fd + Fr; 26 | 27 | return color * light.color_intensity.rgb * light.color_intensity.w * light.attenuation * NoL * (1.0 - visibility); 28 | } -------------------------------------------------------------------------------- /Engine/BuiltinResources/Shaders/shading_unlit.fs: -------------------------------------------------------------------------------- 1 | vec4 EvaluateMaterial(const MaterialFragmentParams material_params) { 2 | vec4 color = material_params.base_color; 3 | return color; 4 | } -------------------------------------------------------------------------------- /Engine/External/filesystem/filesystem/fwd.h: -------------------------------------------------------------------------------- 1 | /* 2 | fwd.h -- Forward declarations for path.h and resolver.h 3 | 4 | Copyright (c) 2015 Wenzel Jakob 5 | 6 | All rights reserved. Use of this source code is governed by a 7 | BSD-style license that can be found in the LICENSE file. 8 | */ 9 | 10 | #pragma once 11 | 12 | #if !defined(NAMESPACE_BEGIN) 13 | #define NAMESPACE_BEGIN(name) namespace name { 14 | #endif 15 | #if !defined(NAMESPACE_END) 16 | #define NAMESPACE_END(name) } 17 | #endif 18 | 19 | NAMESPACE_BEGIN(filesystem) 20 | 21 | class path; 22 | class resolver; 23 | 24 | NAMESPACE_END(filesystem) 25 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Workaround for compatibility with other libraries 4 | #ifdef max 5 | #undef max 6 | #endif 7 | 8 | //! Workaround for compatibility with other libraries 9 | #ifdef min 10 | #undef min 11 | #endif 12 | 13 | //! Workaround for Android 14 | #ifdef isnan 15 | #undef isnan 16 | #endif 17 | 18 | //! Workaround for Android 19 | #ifdef isinf 20 | #undef isinf 21 | #endif 22 | 23 | //! Workaround for Chrone Native Client 24 | #ifdef log2 25 | #undef log2 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/compute_common.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | #include 5 | 6 | namespace glm{ 7 | namespace detail 8 | { 9 | template 10 | struct compute_abs 11 | {}; 12 | 13 | template 14 | struct compute_abs 15 | { 16 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x) 17 | { 18 | GLM_STATIC_ASSERT( 19 | std::numeric_limits::is_iec559 || std::numeric_limits::is_signed, 20 | "'abs' only accept floating-point and integer scalar or vector inputs"); 21 | 22 | return x >= genFIType(0) ? x : -x; 23 | // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff; 24 | } 25 | }; 26 | 27 | #if GLM_COMPILER & GLM_COMPILER_CUDA 28 | template<> 29 | struct compute_abs 30 | { 31 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static float call(float x) 32 | { 33 | return fabsf(x); 34 | } 35 | }; 36 | #endif 37 | 38 | template 39 | struct compute_abs 40 | { 41 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x) 42 | { 43 | GLM_STATIC_ASSERT( 44 | (!std::numeric_limits::is_signed && std::numeric_limits::is_integer), 45 | "'abs' only accept floating-point and integer scalar or vector inputs"); 46 | return x; 47 | } 48 | }; 49 | }//namespace detail 50 | }//namespace glm 51 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "compute_common.hpp" 4 | #include "setup.hpp" 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 14 | { 15 | return a == b; 16 | } 17 | }; 18 | /* 19 | template 20 | struct compute_equal 21 | { 22 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 23 | { 24 | return detail::compute_abs::is_signed>::call(b - a) <= static_cast(0); 25 | //return std::memcmp(&a, &b, sizeof(T)) == 0; 26 | } 27 | }; 28 | */ 29 | }//namespace detail 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/func_exponential_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_exponential_simd.inl 3 | 4 | #include "../simd/exponential.h" 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | template 12 | struct compute_sqrt<4, float, Q, true> 13 | { 14 | GLM_FUNC_QUALIFIER static vec<4, float, Q> call(vec<4, float, Q> const& v) 15 | { 16 | vec<4, float, Q> Result; 17 | Result.data = _mm_sqrt_ps(v.data); 18 | return Result; 19 | } 20 | }; 21 | 22 | # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE 23 | template<> 24 | struct compute_sqrt<4, float, aligned_lowp, true> 25 | { 26 | GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v) 27 | { 28 | vec<4, float, aligned_lowp> Result; 29 | Result.data = glm_vec4_sqrt_lowp(v.data); 30 | return Result; 31 | } 32 | }; 33 | # endif 34 | }//namespace detail 35 | }//namespace glm 36 | 37 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 38 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Engine/External/glm/detail/func_trigonometric_simd.inl -------------------------------------------------------------------------------- /Engine/External/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | 5 | namespace glm{ 6 | namespace detail 7 | { 8 | typedef short hdata; 9 | 10 | GLM_FUNC_DECL float toFloat32(hdata value); 11 | GLM_FUNC_DECL hdata toFloat16(float const& value); 12 | 13 | }//namespace detail 14 | }//namespace glm 15 | 16 | #include "type_half.inl" 17 | -------------------------------------------------------------------------------- /Engine/External/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, double, defaultp> dmat2x2; 16 | 17 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, double, defaultp> dmat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, double, defaultp> dmat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, double, defaultp> dmat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, double, defaultp> dmat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, double, defaultp> dmat3x3; 16 | 17 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, double, defaultp> dmat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, double, defaultp> dmat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, double, defaultp> dmat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, double, defaultp> dmat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_double4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, double, defaultp> dmat4x4; 16 | 17 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, double, defaultp> dmat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, float, defaultp> mat2x2; 16 | 17 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, float, defaultp> mat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, float, defaultp> mat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, float, defaultp> mat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, float, defaultp> mat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, float, defaultp> mat3x3; 16 | 17 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, float, defaultp> mat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, float, defaultp> mat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, float, defaultp> mat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, float, defaultp> mat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/matrix_float4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @ingroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, float, defaultp> mat4x4; 16 | 17 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, float, defaultp> mat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_common_simd.inl: -------------------------------------------------------------------------------- 1 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_dot, float, true> 8 | { 9 | static GLM_FUNC_QUALIFIER float call(qua const& x, qua const& y) 10 | { 11 | return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); 12 | } 13 | }; 14 | }//namespace detail 15 | }//namespace glm 16 | 17 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 18 | 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_double.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_double 2 | /// @file glm/ext/quaternion_double.hpp 3 | /// 4 | /// @defgroup ext_quaternion_double GLM_EXT_quaternion_double 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_float 12 | /// @see ext_quaternion_double_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_double extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_double 32 | /// @{ 33 | 34 | /// Quaternion of double-precision floating-point numbers. 35 | typedef qua dquat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_double_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_double_precision 2 | /// @file glm/ext/quaternion_double_precision.hpp 3 | /// 4 | /// @defgroup ext_quaternion_double_precision GLM_EXT_quaternion_double_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point quaternion type with various precision in term of ULPs. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependency: 14 | #include "../detail/type_quat.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_quaternion_double_precision extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_quaternion_double_precision 23 | /// @{ 24 | 25 | /// Quaternion of double-precision floating-point numbers using high precision arithmetic in term of ULPs. 26 | /// 27 | /// @see ext_quaternion_double_precision 28 | typedef qua lowp_dquat; 29 | 30 | /// Quaternion of medium double-qualifier floating-point numbers using high precision arithmetic in term of ULPs. 31 | /// 32 | /// @see ext_quaternion_double_precision 33 | typedef qua mediump_dquat; 34 | 35 | /// Quaternion of high double-qualifier floating-point numbers using high precision arithmetic in term of ULPs. 36 | /// 37 | /// @see ext_quaternion_double_precision 38 | typedef qua highp_dquat; 39 | 40 | /// @} 41 | } //namespace glm 42 | 43 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_float.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float 2 | /// @file glm/ext/quaternion_float.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float GLM_EXT_quaternion_float 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_double 12 | /// @see ext_quaternion_float_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_float extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_float 32 | /// @{ 33 | 34 | /// Quaternion of single-precision floating-point numbers. 35 | typedef qua quat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_float_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float_precision 2 | /// @file glm/ext/quaternion_float_precision.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float_precision GLM_EXT_quaternion_float_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type with various precision in term of ULPs. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependency: 14 | #include "../detail/type_quat.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_quaternion_float_precision extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_quaternion_float_precision 23 | /// @{ 24 | 25 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 26 | typedef qua lowp_quat; 27 | 28 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 29 | typedef qua mediump_quat; 30 | 31 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 32 | typedef qua highp_quat; 33 | 34 | /// @} 35 | } //namespace glm 36 | 37 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_geometric.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER T dot(qua const& x, qua const& y) 5 | { 6 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs"); 7 | return detail::compute_dot, T, detail::is_aligned::value>::call(x, y); 8 | } 9 | 10 | template 11 | GLM_FUNC_QUALIFIER T length(qua const& q) 12 | { 13 | return glm::sqrt(dot(q, q)); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER qua normalize(qua const& q) 18 | { 19 | T len = length(q); 20 | if(len <= static_cast(0)) // Problem 21 | return qua(static_cast(1), static_cast(0), static_cast(0), static_cast(0)); 22 | T oneOverLen = static_cast(1) / len; 23 | return qua(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER qua cross(qua const& q1, qua const& q2) 28 | { 29 | return qua( 30 | q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, 31 | q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, 32 | q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, 33 | q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); 34 | } 35 | }//namespace glm 36 | 37 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_relational.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y) 5 | { 6 | vec<4, bool, Q> Result; 7 | for(length_t i = 0; i < x.length(); ++i) 8 | Result[i] = x[i] == y[i]; 9 | return Result; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y, T epsilon) 14 | { 15 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 16 | return lessThan(abs(v), vec<4, T, Q>(epsilon)); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y) 21 | { 22 | vec<4, bool, Q> Result; 23 | for(length_t i = 0; i < x.length(); ++i) 24 | Result[i] = x[i] != y[i]; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y, T epsilon) 30 | { 31 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 32 | return greaterThanEqual(abs(v), vec<4, T, Q>(epsilon)); 33 | } 34 | }//namespace glm 35 | 36 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_transform.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_transform 2 | /// @file glm/ext/quaternion_transform.hpp 3 | /// 4 | /// @defgroup ext_quaternion_transform GLM_EXT_quaternion_transform 5 | /// @ingroup ext 6 | /// 7 | /// Provides transformation functions for quaternion types 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_float 12 | /// @see ext_quaternion_double 13 | /// @see ext_quaternion_exponential 14 | /// @see ext_quaternion_geometric 15 | /// @see ext_quaternion_relational 16 | /// @see ext_quaternion_trigonometric 17 | 18 | #pragma once 19 | 20 | // Dependency: 21 | #include "../common.hpp" 22 | #include "../trigonometric.hpp" 23 | #include "../geometric.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_transform extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_transform 32 | /// @{ 33 | 34 | /// Rotates a quaternion from a vector of 3 components axis and an angle. 35 | /// 36 | /// @param q Source orientation 37 | /// @param angle Angle expressed in radians. 38 | /// @param axis Axis of the rotation 39 | /// 40 | /// @tparam T Floating-point scalar types 41 | /// @tparam Q Value from qualifier enum 42 | template 43 | GLM_FUNC_DECL qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& axis); 44 | /// @} 45 | } //namespace glm 46 | 47 | #include "quaternion_transform.inl" 48 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_transform.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& v) 5 | { 6 | vec<3, T, Q> Tmp = v; 7 | 8 | // Axis of rotation must be normalised 9 | T len = glm::length(Tmp); 10 | if(abs(len - static_cast(1)) > static_cast(0.001)) 11 | { 12 | T oneOverLen = static_cast(1) / len; 13 | Tmp.x *= oneOverLen; 14 | Tmp.y *= oneOverLen; 15 | Tmp.z *= oneOverLen; 16 | } 17 | 18 | T const AngleRad(angle); 19 | T const Sin = sin(AngleRad * static_cast(0.5)); 20 | 21 | return q * qua(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 22 | } 23 | }//namespace glm 24 | 25 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/quaternion_trigonometric.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER T angle(qua const& x) 5 | { 6 | return acos(x.w) * static_cast(2); 7 | } 8 | 9 | template 10 | GLM_FUNC_QUALIFIER vec<3, T, Q> axis(qua const& x) 11 | { 12 | T const tmp1 = static_cast(1) - x.w * x.w; 13 | if(tmp1 <= static_cast(0)) 14 | return vec<3, T, Q>(0, 0, 1); 15 | T const tmp2 = static_cast(1) / sqrt(tmp1); 16 | return vec<3, T, Q>(x.x * tmp2, x.y * tmp2, x.z * tmp2); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER qua angleAxis(T const& angle, vec<3, T, Q> const& v) 21 | { 22 | T const a(angle); 23 | T const s = glm::sin(a * static_cast(0.5)); 24 | 25 | return qua(glm::cos(a * static_cast(0.5)), v * s); 26 | } 27 | }//namespace glm 28 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/scalar_constants.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_constants 2 | /// @file glm/ext/scalar_constants.hpp 3 | /// 4 | /// @defgroup ext_scalar_constants GLM_EXT_scalar_constants 5 | /// @ingroup ext 6 | /// 7 | /// Provides a list of constants and precomputed useful values. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependencies 14 | #include "../detail/setup.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_scalar_constants extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_scalar_constants 23 | /// @{ 24 | 25 | /// Return the epsilon constant for floating point types. 26 | template 27 | GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon(); 28 | 29 | /// Return the pi constant for floating point types. 30 | template 31 | GLM_FUNC_DECL GLM_CONSTEXPR genType pi(); 32 | 33 | /// @} 34 | } //namespace glm 35 | 36 | #include "scalar_constants.inl" 37 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/scalar_constants.inl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() 7 | { 8 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 9 | return std::numeric_limits::epsilon(); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() 14 | { 15 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 16 | return static_cast(3.14159265358979323846264338327950288); 17 | } 18 | } //namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | #include "../common.hpp" 2 | #include "../ext/scalar_int_sized.hpp" 3 | #include "../ext/scalar_uint_sized.hpp" 4 | #include "../detail/type_float.hpp" 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon) 10 | { 11 | return abs(x - y) <= epsilon; 12 | } 13 | 14 | template 15 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon) 16 | { 17 | return abs(x - y) > epsilon; 18 | } 19 | 20 | template 21 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, int MaxULPs) 22 | { 23 | detail::float_t const a(x); 24 | detail::float_t const b(y); 25 | 26 | // Different signs means they do not match. 27 | if(a.negative() != b.negative()) 28 | { 29 | // Check for equality to make sure +0==-0 30 | return a.mantissa() == b.mantissa() && a.exponent() == b.exponent(); 31 | } 32 | 33 | // Find the difference in ULPs. 34 | typename detail::float_t::int_type const DiffULPs = abs(a.i - b.i); 35 | return DiffULPs <= MaxULPs; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, int ULPs) 40 | { 41 | return !equal(x, y, ULPs); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1 2 | /// @file glm/ext/vector_bool1.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes bvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_bool1_precision extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_bool1 extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_bool1 24 | /// @{ 25 | 26 | /// 1 components vector of boolean. 27 | typedef vec<1, bool, defaultp> bvec1; 28 | 29 | /// @} 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1_precision 2 | /// @file glm/ext/vector_bool1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1_precision GLM_EXT_vector_bool1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_bvec1, mediump_bvec1 and lowp_bvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_bool1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_bool1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of bool values. 25 | typedef vec<1, bool, highp> highp_bvec1; 26 | 27 | /// 1 component vector of bool values. 28 | typedef vec<1, bool, mediump> mediump_bvec1; 29 | 30 | /// 1 component vector of bool values. 31 | typedef vec<1, bool, lowp> lowp_bvec1; 32 | 33 | /// @} 34 | }//namespace glm 35 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, bool, defaultp> bvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool2_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 2 components vector of high qualifier bool numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<2, bool, highp> highp_bvec2; 17 | 18 | /// 2 components vector of medium qualifier bool numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<2, bool, mediump> mediump_bvec2; 23 | 24 | /// 2 components vector of low qualifier bool numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<2, bool, lowp> lowp_bvec2; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, bool, defaultp> bvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool3_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 3 components vector of high qualifier bool numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<3, bool, highp> highp_bvec3; 17 | 18 | /// 3 components vector of medium qualifier bool numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<3, bool, mediump> mediump_bvec3; 23 | 24 | /// 3 components vector of low qualifier bool numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<3, bool, lowp> lowp_bvec3; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, bool, defaultp> bvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_bool4_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 4 components vector of high qualifier bool numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<4, bool, highp> highp_bvec4; 17 | 18 | /// 4 components vector of medium qualifier bool numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<4, bool, mediump> mediump_bvec4; 23 | 24 | /// 4 components vector of low qualifier bool numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<4, bool, lowp> lowp_bvec4; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_double1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1 2 | /// @file glm/ext/vector_double1.hpp 3 | /// 4 | /// @defgroup ext_vector_double1 GLM_EXT_vector_double1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1_precision extension. 12 | /// @see ext_vector_float1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_dvec1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_double1 25 | /// @{ 26 | 27 | /// 1 components vector of double-precision floating-point numbers. 28 | typedef vec<1, double, defaultp> dvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_double1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1_precision 2 | /// @file glm/ext/vector_double1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_double1_precision GLM_EXT_vector_double1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_double1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_double1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, double, highp> highp_dvec1; 28 | 29 | /// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, double, mediump> mediump_dvec1; 31 | 32 | /// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, double, lowp> lowp_dvec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_double2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, double, defaultp> dvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_double2_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 2 components vector of high double-qualifier floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<2, double, highp> highp_dvec2; 17 | 18 | /// 2 components vector of medium double-qualifier floating-point numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<2, double, mediump> mediump_dvec2; 23 | 24 | /// 2 components vector of low double-qualifier floating-point numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<2, double, lowp> lowp_dvec2; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_double3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, double, defaultp> dvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_double4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, double, defaultp> dvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1 2 | /// @file glm/ext/vector_float1.hpp 3 | /// 4 | /// @defgroup ext_vector_float1 GLM_EXT_vector_float1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1_precision extension. 12 | /// @see ext_vector_double1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_float1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_float1 25 | /// @{ 26 | 27 | /// 1 components vector of single-precision floating-point numbers. 28 | typedef vec<1, float, defaultp> vec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1_precision 2 | /// @file glm/ext/vector_float1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_float1_precision GLM_EXT_vector_float1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_vec1, mediump_vec1 and lowp_vec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1 extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_float1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_float1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, float, highp> highp_vec1; 28 | 29 | /// 1 component vector of single-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, float, mediump> mediump_vec1; 31 | 32 | /// 1 component vector of single-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, float, lowp> lowp_vec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, float, defaultp> vec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float2_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 2 components vector of high single-qualifier floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<2, float, highp> highp_vec2; 17 | 18 | /// 2 components vector of medium single-qualifier floating-point numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<2, float, mediump> mediump_vec2; 23 | 24 | /// 2 components vector of low single-qualifier floating-point numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<2, float, lowp> lowp_vec2; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, float, defaultp> vec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float3_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 3 components vector of high single-qualifier floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<3, float, highp> highp_vec3; 17 | 18 | /// 3 components vector of medium single-qualifier floating-point numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<3, float, mediump> mediump_vec3; 23 | 24 | /// 3 components vector of low single-qualifier floating-point numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<3, float, lowp> lowp_vec3; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, float, defaultp> vec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_float4_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 4 components vector of high single-qualifier floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<4, float, highp> highp_vec4; 17 | 18 | /// 4 components vector of medium single-qualifier floating-point numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<4, float, mediump> mediump_vec4; 23 | 24 | /// 4 components vector of low single-qualifier floating-point numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<4, float, lowp> lowp_vec4; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_int1 2 | /// @file glm/ext/vector_int1.hpp 3 | /// 4 | /// @defgroup ext_vector_int1 GLM_EXT_vector_int1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes ivec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_uint1 extension. 12 | /// @see ext_vector_int1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_int1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_int1 25 | /// @{ 26 | 27 | /// 1 component vector of signed integer numbers. 28 | typedef vec<1, int, defaultp> ivec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_int1_precision 2 | /// @file glm/ext/vector_int1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_int1_precision GLM_EXT_vector_int1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_ivec1, mediump_ivec1 and lowp_ivec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_int1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_int1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of signed integer values. 25 | typedef vec<1, int, highp> highp_ivec1; 26 | 27 | /// 1 component vector of signed integer values. 28 | typedef vec<1, int, mediump> mediump_ivec1; 29 | 30 | /// 1 component vector of signed integer values. 31 | typedef vec<1, int, lowp> lowp_ivec1; 32 | 33 | /// @} 34 | }//namespace glm 35 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, int, defaultp> ivec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int2_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 2 components vector of high qualifier signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<2, int, highp> highp_ivec2; 17 | 18 | /// 2 components vector of medium qualifier signed integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<2, int, mediump> mediump_ivec2; 23 | 24 | /// 2 components vector of low qualifier signed integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<2, int, lowp> lowp_ivec2; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, int, defaultp> ivec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int3_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 3 components vector of high qualifier signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<3, int, highp> highp_ivec3; 17 | 18 | /// 3 components vector of medium qualifier signed integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<3, int, mediump> mediump_ivec3; 23 | 24 | /// 3 components vector of low qualifier signed integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<3, int, lowp> lowp_ivec3; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, int, defaultp> ivec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_int4_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 4 components vector of high qualifier signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<4, int, highp> highp_ivec4; 17 | 18 | /// 4 components vector of medium qualifier signed integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<4, int, mediump> mediump_ivec4; 23 | 24 | /// 4 components vector of low qualifier signed integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<4, int, lowp> lowp_ivec4; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_uint1 2 | /// @file glm/ext/vector_uint1.hpp 3 | /// 4 | /// @defgroup ext_vector_uint1 GLM_EXT_vector_uint1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes uvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_int1 extension. 12 | /// @see ext_vector_uint1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_uint1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_uint1 25 | /// @{ 26 | 27 | /// 1 component vector of unsigned integer numbers. 28 | typedef vec<1, unsigned int, defaultp> uvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_uint1_precision 2 | /// @file glm/ext/vector_uint1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_uint1_precision GLM_EXT_vector_uint1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_uvec1, mediump_uvec1 and lowp_uvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_uint1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_uint1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of unsigned integer values. 25 | /// 26 | /// @see ext_vector_uint1_precision 27 | typedef vec<1, unsigned int, highp> highp_uvec1; 28 | 29 | /// 1 component vector of unsigned integer values. 30 | /// 31 | /// @see ext_vector_uint1_precision 32 | typedef vec<1, unsigned int, mediump> mediump_uvec1; 33 | 34 | /// 1 component vector of unsigned integer values. 35 | /// 36 | /// @see ext_vector_uint1_precision 37 | typedef vec<1, unsigned int, lowp> lowp_uvec1; 38 | 39 | /// @} 40 | }//namespace glm 41 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, unsigned int, defaultp> uvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint2_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 2 components vector of high qualifier unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<2, unsigned int, highp> highp_uvec2; 17 | 18 | /// 2 components vector of medium qualifier unsigned integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<2, unsigned int, mediump> mediump_uvec2; 23 | 24 | /// 2 components vector of low qualifier unsigned integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<2, unsigned int, lowp> lowp_uvec2; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, unsigned int, defaultp> uvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint3_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 3 components vector of high qualifier unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<3, unsigned int, highp> highp_uvec3; 17 | 18 | /// 3 components vector of medium qualifier unsigned integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<3, unsigned int, mediump> mediump_uvec3; 23 | 24 | /// 3 components vector of low qualifier unsigned integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<3, unsigned int, lowp> lowp_uvec3; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, unsigned int, defaultp> uvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /Engine/External/glm/ext/vector_uint4_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4_precision.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector_precision 10 | /// @{ 11 | 12 | /// 4 components vector of high qualifier unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 16 | typedef vec<4, unsigned int, highp> highp_uvec4; 17 | 18 | /// 4 components vector of medium qualifier unsigned integer numbers. 19 | /// 20 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 21 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 22 | typedef vec<4, unsigned int, mediump> mediump_uvec4; 23 | 24 | /// 4 components vector of low qualifier unsigned integer numbers. 25 | /// 26 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 27 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 28 | typedef vec<4, unsigned int, lowp> lowp_uvec4; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /Engine/External/glm/gtc/matrix_access.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_access 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType row 7 | ( 8 | genType const& m, 9 | length_t index, 10 | typename genType::row_type const& x 11 | ) 12 | { 13 | assert(index >= 0 && index < m[0].length()); 14 | 15 | genType Result = m; 16 | for(length_t i = 0; i < m.length(); ++i) 17 | Result[i][index] = x[i]; 18 | return Result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER typename genType::row_type row 23 | ( 24 | genType const& m, 25 | length_t index 26 | ) 27 | { 28 | assert(index >= 0 && index < m[0].length()); 29 | 30 | typename genType::row_type Result(0); 31 | for(length_t i = 0; i < m.length(); ++i) 32 | Result[i] = m[i][index]; 33 | return Result; 34 | } 35 | 36 | template 37 | GLM_FUNC_QUALIFIER genType column 38 | ( 39 | genType const& m, 40 | length_t index, 41 | typename genType::col_type const& x 42 | ) 43 | { 44 | assert(index >= 0 && index < m.length()); 45 | 46 | genType Result = m; 47 | Result[index] = x; 48 | return Result; 49 | } 50 | 51 | template 52 | GLM_FUNC_QUALIFIER typename genType::col_type column 53 | ( 54 | genType const& m, 55 | length_t index 56 | ) 57 | { 58 | assert(index >= 0 && index < m.length()); 59 | 60 | return m[index]; 61 | } 62 | }//namespace glm 63 | -------------------------------------------------------------------------------- /Engine/External/glm/gtc/matrix_transform.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_transform 2 | /// @file glm/gtc/matrix_transform.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_transform 6 | /// @see gtx_transform2 7 | /// 8 | /// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform 9 | /// @ingroup gtc 10 | /// 11 | /// Include to use the features of this extension. 12 | /// 13 | /// Defines functions that generate common transformation matrices. 14 | /// 15 | /// The matrices generated by this extension use standard OpenGL fixed-function 16 | /// conventions. For example, the lookAt function generates a transform from world 17 | /// space into the specific eye space that the projective matrix functions 18 | /// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility 19 | /// specifications defines the particular layout of this eye space. 20 | 21 | #pragma once 22 | 23 | // Dependencies 24 | #include "../mat4x4.hpp" 25 | #include "../vec2.hpp" 26 | #include "../vec3.hpp" 27 | #include "../vec4.hpp" 28 | #include "../ext/matrix_projection.hpp" 29 | #include "../ext/matrix_clip_space.hpp" 30 | #include "../ext/matrix_transform.hpp" 31 | 32 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 33 | # pragma message("GLM: GLM_GTC_matrix_transform extension included") 34 | #endif 35 | 36 | #include "matrix_transform.inl" 37 | -------------------------------------------------------------------------------- /Engine/External/glm/gtc/matrix_transform.inl: -------------------------------------------------------------------------------- 1 | #include "../geometric.hpp" 2 | #include "../trigonometric.hpp" 3 | #include "../matrix.hpp" 4 | -------------------------------------------------------------------------------- /Engine/External/glm/gtc/quaternion_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Engine/External/glm/gtc/quaternion_simd.inl -------------------------------------------------------------------------------- /Engine/External/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /Engine/External/glm/gtc/ulp.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_ulp 2 | /// @file glm/gtc/ulp.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_ulp GLM_GTC_ulp 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Allow the measurement of the accuracy of a function against a reference 12 | /// implementation. This extension works on floating-point data and provide results 13 | /// in ULP. 14 | 15 | #pragma once 16 | 17 | // Dependencies 18 | #include "../ext/scalar_ulp.hpp" 19 | #include "../ext/vector_ulp.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 22 | # pragma message("GLM: GLM_GTC_ulp extension included") 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /Engine/External/glm/gtc/ulp.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_ulp 2 | /// 3 | 4 | -------------------------------------------------------------------------------- /Engine/External/glm/gtc/vec1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_vec1 GLM_GTC_vec1 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Add vec1, ivec1, uvec1 and bvec1 types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../ext/vector_bool1.hpp" 17 | #include "../ext/vector_bool1_precision.hpp" 18 | #include "../ext/vector_float1.hpp" 19 | #include "../ext/vector_float1_precision.hpp" 20 | #include "../ext/vector_double1.hpp" 21 | #include "../ext/vector_double1_precision.hpp" 22 | #include "../ext/vector_int1.hpp" 23 | #include "../ext/vector_int1_precision.hpp" 24 | #include "../ext/vector_uint1.hpp" 25 | #include "../ext/vector_uint1_precision.hpp" 26 | 27 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 28 | # pragma message("GLM: GLM_GTC_vec1 extension included") 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/closest_point.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | /// @file glm/gtx/closest_point.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_closest_point GLM_GTX_closest_point 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Find the point on a straight line which is the closet of a point. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_closest_point extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_closest_point 29 | /// @{ 30 | 31 | /// Find the point on a straight line which is the closet of a point. 32 | /// @see gtx_closest_point 33 | template 34 | GLM_FUNC_DECL vec<3, T, Q> closestPointOnLine( 35 | vec<3, T, Q> const& point, 36 | vec<3, T, Q> const& a, 37 | vec<3, T, Q> const& b); 38 | 39 | /// 2d lines work as well 40 | template 41 | GLM_FUNC_DECL vec<2, T, Q> closestPointOnLine( 42 | vec<2, T, Q> const& point, 43 | vec<2, T, Q> const& a, 44 | vec<2, T, Q> const& b); 45 | 46 | /// @} 47 | }// namespace glm 48 | 49 | #include "closest_point.inl" 50 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> closestPointOnLine 7 | ( 8 | vec<3, T, Q> const& point, 9 | vec<3, T, Q> const& a, 10 | vec<3, T, Q> const& b 11 | ) 12 | { 13 | T LineLength = distance(a, b); 14 | vec<3, T, Q> Vector = point - a; 15 | vec<3, T, Q> LineDirection = (b - a) / LineLength; 16 | 17 | // Project Vector to LineDirection to get the distance of point from a 18 | T Distance = dot(Vector, LineDirection); 19 | 20 | if(Distance <= T(0)) return a; 21 | if(Distance >= LineLength) return b; 22 | return a + LineDirection * Distance; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER vec<2, T, Q> closestPointOnLine 27 | ( 28 | vec<2, T, Q> const& point, 29 | vec<2, T, Q> const& a, 30 | vec<2, T, Q> const& b 31 | ) 32 | { 33 | T LineLength = distance(a, b); 34 | vec<2, T, Q> Vector = point - a; 35 | vec<2, T, Q> LineDirection = (b - a) / LineLength; 36 | 37 | // Project Vector to LineDirection to get the distance of point from a 38 | T Distance = dot(Vector, LineDirection); 39 | 40 | if(Distance <= T(0)) return a; 41 | if(Distance >= LineLength) return b; 42 | return a + LineDirection * Distance; 43 | } 44 | 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/extend.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_extend GLM_GTX_extend 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_extend extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_extend 29 | /// @{ 30 | 31 | /// Extends of Length the Origin position using the (Source - Origin) direction. 32 | /// @see gtx_extend 33 | template 34 | GLM_FUNC_DECL genType extend( 35 | genType const& Origin, 36 | genType const& Source, 37 | typename genType::value_type const Length); 38 | 39 | /// @} 40 | }//namespace glm 41 | 42 | #include "extend.inl" 43 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType extend 7 | ( 8 | genType const& Origin, 9 | genType const& Source, 10 | genType const& Distance 11 | ) 12 | { 13 | return Origin + (Source - Origin) * Distance; 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER vec<2, T, Q> extend 18 | ( 19 | vec<2, T, Q> const& Origin, 20 | vec<2, T, Q> const& Source, 21 | T const& Distance 22 | ) 23 | { 24 | return Origin + (Source - Origin) * Distance; 25 | } 26 | 27 | template 28 | GLM_FUNC_QUALIFIER vec<3, T, Q> extend 29 | ( 30 | vec<3, T, Q> const& Origin, 31 | vec<3, T, Q> const& Source, 32 | T const& Distance 33 | ) 34 | { 35 | return Origin + (Source - Origin) * Distance; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER vec<4, T, Q> extend 40 | ( 41 | vec<4, T, Q> const& Origin, 42 | vec<4, T, Q> const& Source, 43 | T const& Distance 44 | ) 45 | { 46 | return Origin + (Source - Origin) * Distance; 47 | } 48 | }//namespace glm 49 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/exterior_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | /// @file glm/gtx/exterior_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_exterior_product (dependence) 6 | /// 7 | /// @defgroup gtx_exterior_product GLM_GTX_exterior_product 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// @brief Allow to perform bit operations on integer values 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/qualifier.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 21 | # pragma message("GLM: GLM_GTX_exterior_product extension included") 22 | #endif 23 | 24 | namespace glm 25 | { 26 | /// @addtogroup gtx_exterior_product 27 | /// @{ 28 | 29 | /// Returns the cross product of x and y. 30 | /// 31 | /// @tparam T Floating-point scalar types 32 | /// @tparam Q Value from qualifier enum 33 | /// 34 | /// @see Exterior product 35 | template 36 | GLM_FUNC_DECL T cross(vec<2, T, Q> const& v, vec<2, T, Q> const& u); 37 | 38 | /// @} 39 | } //namespace glm 40 | 41 | #include "exterior_product.inl" 42 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | 3 | #include 4 | 5 | namespace glm { 6 | namespace detail 7 | { 8 | template 9 | struct compute_cross_vec2 10 | { 11 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 14 | 15 | return v.x * u.y - u.x * v.y; 16 | } 17 | }; 18 | }//namespace detail 19 | 20 | template 21 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 22 | { 23 | return detail::compute_cross_vec2::value>::call(x, y); 24 | } 25 | }//namespace glm 26 | 27 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | 3 | #include 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 9 | { 10 | return vec(v) / static_cast(std::numeric_limits::max()); 11 | } 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/functions.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_functions 2 | /// @file glm/gtx/functions.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_quaternion (dependence) 6 | /// 7 | /// @defgroup gtx_functions GLM_GTX_functions 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// List of useful common functions. 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/qualifier.hpp" 19 | #include "../detail/type_vec2.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 22 | # pragma message("GLM: GLM_GTX_functions extension included") 23 | #endif 24 | 25 | namespace glm 26 | { 27 | /// @addtogroup gtx_functions 28 | /// @{ 29 | 30 | /// 1D gauss function 31 | /// 32 | /// @see gtc_epsilon 33 | template 34 | GLM_FUNC_DECL T gauss( 35 | T x, 36 | T ExpectedValue, 37 | T StandardDeviation); 38 | 39 | /// 2D gauss function 40 | /// 41 | /// @see gtc_epsilon 42 | template 43 | GLM_FUNC_DECL T gauss( 44 | vec<2, T, Q> const& Coord, 45 | vec<2, T, Q> const& ExpectedValue, 46 | vec<2, T, Q> const& StandardDeviation); 47 | 48 | /// @} 49 | }//namespace glm 50 | 51 | #include "functions.inl" 52 | 53 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/functions.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_functions 2 | 3 | #include "../exponential.hpp" 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER T gauss 9 | ( 10 | T x, 11 | T ExpectedValue, 12 | T StandardDeviation 13 | ) 14 | { 15 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576))); 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER T gauss 20 | ( 21 | vec<2, T, Q> const& Coord, 22 | vec<2, T, Q> const& ExpectedValue, 23 | vec<2, T, Q> const& StandardDeviation 24 | ) 25 | { 26 | vec<2, T, Q> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); 27 | return exp(-(Squared.x + Squared.y)); 28 | } 29 | }//namespace glm 30 | 31 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T radialGradient 7 | ( 8 | vec<2, T, Q> const& Center, 9 | T const& Radius, 10 | vec<2, T, Q> const& Focal, 11 | vec<2, T, Q> const& Position 12 | ) 13 | { 14 | vec<2, T, Q> F = Focal - Center; 15 | vec<2, T, Q> D = Position - Focal; 16 | T Radius2 = pow2(Radius); 17 | T Fx2 = pow2(F.x); 18 | T Fy2 = pow2(F.y); 19 | 20 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 21 | T Denominator = Radius2 - (Fx2 + Fy2); 22 | return Numerator / Denominator; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER T linearGradient 27 | ( 28 | vec<2, T, Q> const& Point0, 29 | vec<2, T, Q> const& Point1, 30 | vec<2, T, Q> const& Position 31 | ) 32 | { 33 | vec<2, T, Q> Dist = Point1 - Point0; 34 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 35 | } 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool rightHanded 7 | ( 8 | vec<3, T, Q> const& tangent, 9 | vec<3, T, Q> const& binormal, 10 | vec<3, T, Q> const& normal 11 | ) 12 | { 13 | return dot(cross(normal, tangent), binormal) > T(0); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool leftHanded 18 | ( 19 | vec<3, T, Q> const& tangent, 20 | vec<3, T, Q> const& binormal, 21 | vec<3, T, Q> const& normal 22 | ) 23 | { 24 | return dot(cross(normal, tangent), binormal) < T(0); 25 | } 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/log_base.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_log_base GLM_GTX_log_base 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Logarithm for any base. base can be a vector or a scalar. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_log_base is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_log_base extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_log_base 29 | /// @{ 30 | 31 | /// Logarithm for any base. 32 | /// From GLM_GTX_log_base. 33 | template 34 | GLM_FUNC_DECL genType log( 35 | genType const& x, 36 | genType const& base); 37 | 38 | /// Logarithm for any base. 39 | /// From GLM_GTX_log_base. 40 | template 41 | GLM_FUNC_DECL vec sign( 42 | vec const& x, 43 | vec const& base); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "log_base.inl" 49 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 7 | { 8 | return glm::log(x) / glm::log(base); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 13 | { 14 | return glm::log(x) / glm::log(base); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/matrix_cross_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | /// @file glm/gtx/matrix_cross_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Build cross product matrices 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_matrix_cross_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_matrix_cross_product 30 | /// @{ 31 | 32 | //! Build a cross product matrix. 33 | //! From GLM_GTX_matrix_cross_product extension. 34 | template 35 | GLM_FUNC_DECL mat<3, 3, T, Q> matrixCross3( 36 | vec<3, T, Q> const& x); 37 | 38 | //! Build a cross product matrix. 39 | //! From GLM_GTX_matrix_cross_product extension. 40 | template 41 | GLM_FUNC_DECL mat<4, 4, T, Q> matrixCross4( 42 | vec<3, T, Q> const& x); 43 | 44 | /// @} 45 | }//namespace glm 46 | 47 | #include "matrix_cross_product.inl" 48 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> matrixCross3 7 | ( 8 | vec<3, T, Q> const& x 9 | ) 10 | { 11 | mat<3, 3, T, Q> Result(T(0)); 12 | Result[0][1] = x.z; 13 | Result[1][0] = -x.z; 14 | Result[0][2] = -x.y; 15 | Result[2][0] = x.y; 16 | Result[1][2] = x.x; 17 | Result[2][1] = -x.x; 18 | return Result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> matrixCross4 23 | ( 24 | vec<3, T, Q> const& x 25 | ) 26 | { 27 | mat<4, 4, T, Q> Result(T(0)); 28 | Result[0][1] = x.z; 29 | Result[1][0] = -x.z; 30 | Result[0][2] = -x.y; 31 | Result[2][0] = x.y; 32 | Result[1][2] = x.x; 33 | Result[2][1] = -x.x; 34 | return Result; 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/matrix_decompose.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_decompose 2 | /// @file glm/gtx/matrix_decompose.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_matrix_decompose GLM_GTX_matrix_decompose 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Decomposes a model matrix to translations, rotation and scale components 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../mat4x4.hpp" 17 | #include "../vec3.hpp" 18 | #include "../vec4.hpp" 19 | #include "../geometric.hpp" 20 | #include "../gtc/quaternion.hpp" 21 | #include "../gtc/matrix_transform.hpp" 22 | 23 | #ifndef GLM_ENABLE_EXPERIMENTAL 24 | # error "GLM: GLM_GTX_matrix_decompose is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 25 | #endif 26 | 27 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 28 | # pragma message("GLM: GLM_GTX_matrix_decompose extension included") 29 | #endif 30 | 31 | namespace glm 32 | { 33 | /// @addtogroup gtx_matrix_decompose 34 | /// @{ 35 | 36 | /// Decomposes a model matrix to translations, rotation and scale components 37 | /// @see gtx_matrix_decompose 38 | template 39 | GLM_FUNC_DECL bool decompose( 40 | mat<4, 4, T, Q> const& modelMatrix, 41 | vec<3, T, Q> & scale, qua & orientation, vec<3, T, Q> & translation, vec<3, T, Q> & skew, vec<4, T, Q> & perspective); 42 | 43 | /// @} 44 | }//namespace glm 45 | 46 | #include "matrix_decompose.inl" 47 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/matrix_factorisation.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Engine/External/glm/gtx/matrix_factorisation.inl -------------------------------------------------------------------------------- /Engine/External/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Mixed product of 3 vectors. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_mixed_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_mixed_product 29 | /// @{ 30 | 31 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 32 | template 33 | GLM_FUNC_DECL T mixedProduct( 34 | vec<3, T, Q> const& v1, 35 | vec<3, T, Q> const& v2, 36 | vec<3, T, Q> const& v3); 37 | 38 | /// @} 39 | }// namespace glm 40 | 41 | #include "mixed_product.inl" 42 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T mixedProduct 7 | ( 8 | vec<3, T, Q> const& v1, 9 | vec<3, T, Q> const& v2, 10 | vec<3, T, Q> const& v3 11 | ) 12 | { 13 | return dot(cross(v1, v2), v3); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_normal GLM_GTX_normal 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Compute the normal of a triangle. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_normal is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_normal extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_normal 30 | /// @{ 31 | 32 | /// Computes triangle normal from triangle points. 33 | /// 34 | /// @see gtx_normal 35 | template 36 | GLM_FUNC_DECL vec<3, T, Q> triangleNormal(vec<3, T, Q> const& p1, vec<3, T, Q> const& p2, vec<3, T, Q> const& p3); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "normal.inl" 42 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 7 | ( 8 | vec<3, T, Q> const& p1, 9 | vec<3, T, Q> const& p2, 10 | vec<3, T, Q> const& p3 11 | ) 12 | { 13 | return normalize(cross(p1 - p2, p1 - p3)); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 7 | { 8 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 13 | { 14 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/optimum_pow.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Integer exponentiation of power functions. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_optimum_pow is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_optimum_pow extension included") 24 | #endif 25 | 26 | namespace glm{ 27 | namespace gtx 28 | { 29 | /// @addtogroup gtx_optimum_pow 30 | /// @{ 31 | 32 | /// Returns x raised to the power of 2. 33 | /// 34 | /// @see gtx_optimum_pow 35 | template 36 | GLM_FUNC_DECL genType pow2(genType const& x); 37 | 38 | /// Returns x raised to the power of 3. 39 | /// 40 | /// @see gtx_optimum_pow 41 | template 42 | GLM_FUNC_DECL genType pow3(genType const& x); 43 | 44 | /// Returns x raised to the power of 4. 45 | /// 46 | /// @see gtx_optimum_pow 47 | template 48 | GLM_FUNC_DECL genType pow4(genType const& x); 49 | 50 | /// @} 51 | }//namespace gtx 52 | }//namespace glm 53 | 54 | #include "optimum_pow.inl" 55 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 7 | { 8 | return x * x; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 13 | { 14 | return x * x * x; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 19 | { 20 | return (x * x) * (x * x); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/orthonormalize.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Orthonormalize matrices. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../vec3.hpp" 18 | #include "../mat3x3.hpp" 19 | #include "../geometric.hpp" 20 | 21 | #ifndef GLM_ENABLE_EXPERIMENTAL 22 | # error "GLM: GLM_GTX_orthonormalize is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 23 | #endif 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_GTX_orthonormalize extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup gtx_orthonormalize 32 | /// @{ 33 | 34 | /// Returns the orthonormalized matrix of m. 35 | /// 36 | /// @see gtx_orthonormalize 37 | template 38 | GLM_FUNC_DECL mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m); 39 | 40 | /// Orthonormalizes x according y. 41 | /// 42 | /// @see gtx_orthonormalize 43 | template 44 | GLM_FUNC_DECL vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y); 45 | 46 | /// @} 47 | }//namespace glm 48 | 49 | #include "orthonormalize.inl" 50 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 7 | { 8 | mat<3, 3, T, Q> r = m; 9 | 10 | r[0] = normalize(r[0]); 11 | 12 | T d0 = dot(r[0], r[1]); 13 | r[1] -= r[0] * d0; 14 | r[1] = normalize(r[1]); 15 | 16 | T d1 = dot(r[1], r[2]); 17 | d0 = dot(r[0], r[2]); 18 | r[2] -= r[0] * d0 + r[1] * d1; 19 | r[2] = normalize(r[2]); 20 | 21 | return r; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 26 | { 27 | return normalize(x - y * dot(y, x)); 28 | } 29 | }//namespace glm 30 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_projection (dependence) 6 | /// 7 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Perpendicular of a vector from other one 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/projection.hpp" 19 | 20 | #ifndef GLM_ENABLE_EXPERIMENTAL 21 | # error "GLM: GLM_GTX_perpendicular is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 22 | #endif 23 | 24 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 25 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_perpendicular 31 | /// @{ 32 | 33 | //! Projects x a perpendicular axis of Normal. 34 | //! From GLM_GTX_perpendicular extension. 35 | template 36 | GLM_FUNC_DECL genType perp(genType const& x, genType const& Normal); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "perpendicular.inl" 42 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 7 | { 8 | return x - proj(x, Normal); 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/polar_coordinates.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Conversion from Euclidean space to polar space and revert. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_polar_coordinates is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_polar_coordinates extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_polar_coordinates 29 | /// @{ 30 | 31 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. 32 | /// 33 | /// @see gtx_polar_coordinates 34 | template 35 | GLM_FUNC_DECL vec<3, T, Q> polar( 36 | vec<3, T, Q> const& euclidean); 37 | 38 | /// Convert Polar to Euclidean coordinates. 39 | /// 40 | /// @see gtx_polar_coordinates 41 | template 42 | GLM_FUNC_DECL vec<3, T, Q> euclidean( 43 | vec<2, T, Q> const& polar); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "polar_coordinates.inl" 49 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> polar 7 | ( 8 | vec<3, T, Q> const& euclidean 9 | ) 10 | { 11 | T const Length(length(euclidean)); 12 | vec<3, T, Q> const tmp(euclidean / Length); 13 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 14 | 15 | return vec<3, T, Q>( 16 | asin(tmp.y), // latitude 17 | atan(tmp.x, tmp.z), // longitude 18 | xz_dist); // xz distance 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER vec<3, T, Q> euclidean 23 | ( 24 | vec<2, T, Q> const& polar 25 | ) 26 | { 27 | T const latitude(polar.x); 28 | T const longitude(polar.y); 29 | 30 | return vec<3, T, Q>( 31 | cos(latitude) * sin(longitude), 32 | sin(latitude), 33 | cos(latitude) * cos(longitude)); 34 | } 35 | 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_projection GLM_GTX_projection 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Projection of a vector to other one 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../geometric.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_projection extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_projection 29 | /// @{ 30 | 31 | /// Projects x on Normal. 32 | /// 33 | /// @see gtx_projection 34 | template 35 | GLM_FUNC_DECL genType proj(genType const& x, genType const& Normal); 36 | 37 | /// @} 38 | }//namespace glm 39 | 40 | #include "projection.inl" 41 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 7 | { 8 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/raw_data.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_raw_data GLM_GTX_raw_data 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Projection of a vector to other one 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../ext/scalar_uint_sized.hpp" 17 | #include "../detail/setup.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_raw_data is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_raw_data extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_raw_data 30 | /// @{ 31 | 32 | //! Type for byte numbers. 33 | //! From GLM_GTX_raw_data extension. 34 | typedef detail::uint8 byte; 35 | 36 | //! Type for word numbers. 37 | //! From GLM_GTX_raw_data extension. 38 | typedef detail::uint16 word; 39 | 40 | //! Type for dword numbers. 41 | //! From GLM_GTX_raw_data extension. 42 | typedef detail::uint32 dword; 43 | 44 | //! Type for qword numbers. 45 | //! From GLM_GTX_raw_data extension. 46 | typedef detail::uint64 qword; 47 | 48 | /// @} 49 | }// namespace glm 50 | 51 | #include "raw_data.inl" 52 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | 3 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_extend extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_scalar_relational 29 | /// @{ 30 | 31 | 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "scalar_relational.inl" 37 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool lessThan 7 | ( 8 | T const& x, 9 | T const& y 10 | ) 11 | { 12 | return x < y; 13 | } 14 | 15 | template 16 | GLM_FUNC_QUALIFIER bool lessThanEqual 17 | ( 18 | T const& x, 19 | T const& y 20 | ) 21 | { 22 | return x <= y; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER bool greaterThan 27 | ( 28 | T const& x, 29 | T const& y 30 | ) 31 | { 32 | return x > y; 33 | } 34 | 35 | template 36 | GLM_FUNC_QUALIFIER bool greaterThanEqual 37 | ( 38 | T const& x, 39 | T const& y 40 | ) 41 | { 42 | return x >= y; 43 | } 44 | 45 | template 46 | GLM_FUNC_QUALIFIER bool equal 47 | ( 48 | T const& x, 49 | T const& y 50 | ) 51 | { 52 | return detail::compute_equal::is_iec559>::call(x, y); 53 | } 54 | 55 | template 56 | GLM_FUNC_QUALIFIER bool notEqual 57 | ( 58 | T const& x, 59 | T const& y 60 | ) 61 | { 62 | return !detail::compute_equal::is_iec559>::call(x, y); 63 | } 64 | 65 | GLM_FUNC_QUALIFIER bool any 66 | ( 67 | bool const& x 68 | ) 69 | { 70 | return x; 71 | } 72 | 73 | GLM_FUNC_QUALIFIER bool all 74 | ( 75 | bool const& x 76 | ) 77 | { 78 | return x; 79 | } 80 | 81 | GLM_FUNC_QUALIFIER bool not_ 82 | ( 83 | bool const& x 84 | ) 85 | { 86 | return !x; 87 | } 88 | }//namespace glm 89 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/texture.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | /// @file glm/gtx/texture.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_texture GLM_GTX_texture 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Wrapping mode of texture coordinates. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | #include "../gtc/integer.hpp" 18 | #include "../gtx/component_wise.hpp" 19 | 20 | #ifndef GLM_ENABLE_EXPERIMENTAL 21 | # error "GLM: GLM_GTX_texture is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 22 | #endif 23 | 24 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 25 | # pragma message("GLM: GLM_GTX_texture extension included") 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_texture 31 | /// @{ 32 | 33 | /// Compute the number of mipmaps levels necessary to create a mipmap complete texture 34 | /// 35 | /// @param Extent Extent of the texture base level mipmap 36 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector 37 | /// @tparam T Floating-point or signed integer scalar types 38 | /// @tparam Q Value from qualifier enum 39 | template 40 | T levels(vec const& Extent); 41 | 42 | /// @} 43 | }// namespace glm 44 | 45 | #include "texture.inl" 46 | 47 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | 3 | namespace glm 4 | { 5 | template 6 | inline T levels(vec const& Extent) 7 | { 8 | return glm::log2(compMax(Extent)) + static_cast(1); 9 | } 10 | 11 | template 12 | inline T levels(T Extent) 13 | { 14 | return vec<1, T, defaultp>(Extent).x; 15 | } 16 | }//namespace glm 17 | 18 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 7 | { 8 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 13 | { 14 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 19 | { 20 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 21 | } 22 | 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /Engine/External/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /Engine/External/glm/mat2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x2.hpp" 6 | #include "./ext/matrix_double2x2_precision.hpp" 7 | #include "./ext/matrix_float2x2.hpp" 8 | #include "./ext/matrix_float2x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /Engine/External/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x3.hpp" 6 | #include "./ext/matrix_double2x3_precision.hpp" 7 | #include "./ext/matrix_float2x3.hpp" 8 | #include "./ext/matrix_float2x3_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /Engine/External/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x4.hpp" 6 | #include "./ext/matrix_double2x4_precision.hpp" 7 | #include "./ext/matrix_float2x4.hpp" 8 | #include "./ext/matrix_float2x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /Engine/External/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x2.hpp" 6 | #include "./ext/matrix_double3x2_precision.hpp" 7 | #include "./ext/matrix_float3x2.hpp" 8 | #include "./ext/matrix_float3x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /Engine/External/glm/mat3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x3.hpp" 6 | #include "./ext/matrix_double3x3_precision.hpp" 7 | #include "./ext/matrix_float3x3.hpp" 8 | #include "./ext/matrix_float3x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /Engine/External/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x4.hpp" 6 | #include "./ext/matrix_double3x4_precision.hpp" 7 | #include "./ext/matrix_float3x4.hpp" 8 | #include "./ext/matrix_float3x4_precision.hpp" 9 | -------------------------------------------------------------------------------- /Engine/External/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x2.hpp" 6 | #include "./ext/matrix_double4x2_precision.hpp" 7 | #include "./ext/matrix_float4x2.hpp" 8 | #include "./ext/matrix_float4x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /Engine/External/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x3.hpp" 6 | #include "./ext/matrix_double4x3_precision.hpp" 7 | #include "./ext/matrix_float4x3.hpp" 8 | #include "./ext/matrix_float4x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /Engine/External/glm/mat4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x4.hpp" 6 | #include "./ext/matrix_double4x4_precision.hpp" 7 | #include "./ext/matrix_float4x4.hpp" 8 | #include "./ext/matrix_float4x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /Engine/External/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /Engine/External/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /Engine/External/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /Engine/External/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /Engine/External/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool2.hpp" 6 | #include "./ext/vector_bool2_precision.hpp" 7 | #include "./ext/vector_float2.hpp" 8 | #include "./ext/vector_float2_precision.hpp" 9 | #include "./ext/vector_double2.hpp" 10 | #include "./ext/vector_double2_precision.hpp" 11 | #include "./ext/vector_int2.hpp" 12 | #include "./ext/vector_int2_precision.hpp" 13 | #include "./ext/vector_uint2.hpp" 14 | #include "./ext/vector_uint2_precision.hpp" 15 | -------------------------------------------------------------------------------- /Engine/External/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool3.hpp" 6 | #include "./ext/vector_bool3_precision.hpp" 7 | #include "./ext/vector_float3.hpp" 8 | #include "./ext/vector_float3_precision.hpp" 9 | #include "./ext/vector_double3.hpp" 10 | #include "./ext/vector_double3_precision.hpp" 11 | #include "./ext/vector_int3.hpp" 12 | #include "./ext/vector_int3_precision.hpp" 13 | #include "./ext/vector_uint3.hpp" 14 | #include "./ext/vector_uint3_precision.hpp" 15 | -------------------------------------------------------------------------------- /Engine/External/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool4.hpp" 6 | #include "./ext/vector_bool4_precision.hpp" 7 | #include "./ext/vector_float4.hpp" 8 | #include "./ext/vector_float4_precision.hpp" 9 | #include "./ext/vector_double4.hpp" 10 | #include "./ext/vector_double4_precision.hpp" 11 | #include "./ext/vector_int4.hpp" 12 | #include "./ext/vector_int4_precision.hpp" 13 | #include "./ext/vector_uint4.hpp" 14 | #include "./ext/vector_uint4_precision.hpp" 15 | 16 | -------------------------------------------------------------------------------- /Engine/Source/Animation/AnimationClip.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Math/Math.h" 4 | #include 5 | #include 6 | #include 7 | 8 | namespace gear { 9 | 10 | enum AnimationTarget { 11 | POSITION, 12 | ROTATION, 13 | SCALE 14 | }; 15 | 16 | struct AnimationKey { 17 | float time; 18 | glm::vec3 vec_value; 19 | glm::quat quat_value; 20 | }; 21 | 22 | struct AnimationTrack { 23 | std::string joint_name; 24 | AnimationTarget target; 25 | std::vector keys; 26 | }; 27 | 28 | class Skeleton; 29 | class AnimationClip { 30 | public: 31 | AnimationClip(std::vector& tracks) { 32 | this->tracks = tracks; 33 | for (uint32_t i = 0; i < tracks.size(); ++i) { 34 | for (uint32_t j = 0; j < tracks[i].keys.size(); ++j) { 35 | if (tracks[i].keys[j].time >= length) { 36 | length = tracks[i].keys[j].time; 37 | } 38 | } 39 | } 40 | } 41 | 42 | ~AnimationClip() { 43 | } 44 | 45 | float GetAnimationLength() { return length; } 46 | 47 | void Sample(float time, std::shared_ptr skeleton); 48 | 49 | private: 50 | friend class AnimationInstance; 51 | std::vector tracks; 52 | float length; 53 | }; 54 | } -------------------------------------------------------------------------------- /Engine/Source/Animation/AnimationInstance.cpp: -------------------------------------------------------------------------------- 1 | #include "AnimationInstance.h" 2 | 3 | namespace gear { 4 | SimpleAnimationInstance::SimpleAnimationInstance() { 5 | } 6 | 7 | SimpleAnimationInstance::~SimpleAnimationInstance() { 8 | } 9 | 10 | void SimpleAnimationInstance::SetTime(float time) { 11 | this->time = time; 12 | if (!skeleton || !animation_clip) { 13 | return; 14 | } 15 | animation_clip->Sample(time, skeleton); 16 | } 17 | 18 | void SimpleAnimationInstance::Tick(float dt) { 19 | if (!skeleton || !animation_clip || puase) { 20 | return; 21 | } 22 | 23 | time += dt; 24 | if (mode == AnimationMode::LOOP) { 25 | if (time >= animation_clip->GetAnimationLength()) { 26 | time = 0.0f; 27 | } 28 | } 29 | 30 | animation_clip->Sample(time, skeleton); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Engine/Source/Animation/AnimationSystem.cpp: -------------------------------------------------------------------------------- 1 | #include "AnimationSystem.h" 2 | #include "AnimationInstance.h" 3 | 4 | namespace gear { 5 | AnimationSystem::AnimationSystem() { 6 | } 7 | 8 | AnimationSystem::~AnimationSystem() { 9 | } 10 | 11 | void AnimationSystem::RegisterInstance(std::shared_ptr instance) { 12 | for (auto iter = instances.begin(); iter != instances.end(); iter++) { 13 | if (*iter == instance) { 14 | return; 15 | } 16 | } 17 | 18 | instances.push_back(instance); 19 | } 20 | 21 | void AnimationSystem::UnregisterInstance(std::shared_ptr instance) { 22 | for (auto iter = instances.begin(); iter != instances.end(); iter++) { 23 | if (*iter == instance) { 24 | instances.erase(iter); 25 | break; 26 | } 27 | } 28 | } 29 | 30 | void AnimationSystem::Tick(float dt) { 31 | for (uint32_t i = 0; i < instances.size(); ++i) { 32 | instances[i]->Tick(dt); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Engine/Source/Animation/AnimationSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace gear { 7 | class AnimationInstance; 8 | 9 | class AnimationSystem { 10 | public: 11 | AnimationSystem(); 12 | 13 | ~AnimationSystem(); 14 | 15 | void RegisterInstance(std::shared_ptr instance); 16 | 17 | void UnregisterInstance(std::shared_ptr instance); 18 | 19 | void Tick(float dt); 20 | 21 | private: 22 | std::vector> instances; 23 | }; 24 | } -------------------------------------------------------------------------------- /Engine/Source/Animation/Skeleton.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Math/Math.h" 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace gear { 13 | struct Joint { 14 | std::string name; 15 | int parent = -1; 16 | glm::vec3 pos = glm::vec3(0.0f, 0.0f, 0.0f); 17 | glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f); 18 | glm::quat rot = glm::quat(1.0f, 0.0f, 0.0f, 0.0f); 19 | glm::mat4 bind_pose = glm::mat4(1.0f); 20 | }; 21 | 22 | class Skeleton { 23 | public: 24 | Skeleton(const std::vector& joints); 25 | 26 | ~Skeleton(); 27 | 28 | Joint* GetJoint(const std::string& name); 29 | 30 | private: 31 | glm::mat4 GetPoseMatrix(int idx); 32 | 33 | bool Prepare(blast::GfxCommandBuffer* cmd); 34 | 35 | blast::GfxBuffer* GetBoneMatrixBuffer() { 36 | return bone_matrix_ub.get(); 37 | } 38 | 39 | private: 40 | friend class Scene; 41 | friend class AnimationClip; 42 | std::vector joints; 43 | std::map joint_indices; 44 | std::vector storage; 45 | std::shared_ptr bone_matrix_ub = nullptr; 46 | }; 47 | } -------------------------------------------------------------------------------- /Engine/Source/Application/BaseApplication.cpp: -------------------------------------------------------------------------------- 1 | #include "BaseApplication.h" 2 | #include "GearEngine.h" 3 | #include "Renderer/Renderer.h" 4 | #include "Window/BaseWindow.h" 5 | #include "Input/InputSystem.h" 6 | #include "Animation/AnimationSystem.h" 7 | 8 | namespace gear { 9 | BaseApplication::BaseApplication() { 10 | } 11 | 12 | BaseApplication::~BaseApplication() { 13 | } 14 | 15 | void BaseApplication::Run(float dt) { 16 | Tick(dt); 17 | 18 | gEngine.GetAnimationSystem()->Tick(dt); 19 | 20 | gEngine.GetRenderer()->Tick(dt); 21 | 22 | gear::gEngine.GetInputSystem()->Reset(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Engine/Source/Application/BaseApplication.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Core/GearDefine.h" 3 | 4 | #include 5 | 6 | namespace gear { 7 | class BaseApplication { 8 | public: 9 | BaseApplication(); 10 | 11 | ~BaseApplication(); 12 | 13 | void Run(float dt); 14 | 15 | virtual bool ShouldClose() { return true; }; 16 | 17 | virtual void Init() {}; 18 | 19 | virtual void Exit() {}; 20 | 21 | protected: 22 | virtual void Tick(float dt) {}; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /Engine/Source/Core/GearDefine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef GEAR_EXPORTS 4 | #define GEAR_EXPORT __declspec(dllexport) 5 | #else 6 | #define GEAR_EXPORT __declspec(dllimport) 7 | #endif 8 | 9 | // MRT的个数 10 | #define TARGET_COUNT 4 11 | 12 | // UniformBuffer个数 13 | #define UBUFFER_BINDING_COUNT 3 14 | 15 | // 纹理采样器个数 16 | #define SAMPLER_BINDING_COUNT 16 17 | 18 | // shader最大纹理数量 19 | #define MAX_TEXTURE_COUNT 32 20 | 21 | // CSM的Cascade个数 22 | #define SHADOW_CASCADE_COUNT 3 23 | 24 | // 阴影贴图个数 25 | #define SHADOW_MAP_COUNT 4 26 | 27 | // 最大的Primitive个数 28 | #define MAX_RENDER_PRIMITIVE_COUNT 6 29 | 30 | // Debug Line数量 31 | #define MAX_DEBUG_LINES 1024 32 | 33 | // Atmosphere 34 | #define TRANSMITTANCE_TEXTURE_WIDTH 256 35 | #define TRANSMITTANCE_TEXTURE_HEIGHT 64 36 | 37 | #define MULTI_SCATTERING_TEXTURE_SIZE 32 38 | 39 | #define SAFE_DELETE(x) \ 40 | { \ 41 | delete x; \ 42 | x = nullptr; \ 43 | } 44 | 45 | #define SAFE_DELETE_ARRAY(x) \ 46 | { \ 47 | delete[] x; \ 48 | x = nullptr; \ 49 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/CAnimation.cpp: -------------------------------------------------------------------------------- 1 | #include "CAnimation.h" 2 | #include "Animation/AnimationSystem.h" 3 | #include "Animation/AnimationInstance.h" 4 | #include "Entity/Entity.h" 5 | #include "GearEngine.h" 6 | 7 | namespace gear { 8 | CAnimation::CAnimation(Entity* entity) 9 | :Component(entity) { 10 | } 11 | 12 | CAnimation::~CAnimation() { 13 | } 14 | 15 | void CAnimation::Play() { 16 | if (!instance) { 17 | return; 18 | } 19 | 20 | gEngine.GetAnimationSystem()->RegisterInstance(instance); 21 | } 22 | 23 | void CAnimation::Stop() { 24 | if (!instance) { 25 | return; 26 | } 27 | 28 | gEngine.GetAnimationSystem()->UnregisterInstance(instance); 29 | } 30 | 31 | void CAnimation::Replay() { 32 | if (!instance) { 33 | return; 34 | } 35 | 36 | instance->Reset(); 37 | Play(); 38 | } 39 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/CAnimation.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Component.h" 3 | #include "Math/Math.h" 4 | 5 | namespace gear { 6 | class AnimationInstance; 7 | class CAnimation : public Component { 8 | public: 9 | CAnimation(Entity* entity); 10 | 11 | virtual ~CAnimation(); 12 | 13 | static ComponentType GetClassType() { return ComponentType::Animation; } 14 | 15 | ComponentType GetType() override { return ComponentType::Animation; } 16 | 17 | void SetAnimationInstance(std::shared_ptr instance) { 18 | this->instance = instance; 19 | } 20 | 21 | void Play(); 22 | 23 | void Stop(); 24 | 25 | void Replay(); 26 | 27 | private: 28 | std::shared_ptr instance = nullptr; 29 | }; 30 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/CAtmosphere.cpp: -------------------------------------------------------------------------------- 1 | #include "CAtmosphere.h" 2 | #include "Entity/Entity.h" 3 | #include "GearEngine.h" 4 | 5 | namespace gear { 6 | CAtmosphere::CAtmosphere(Entity* entity) 7 | :Component(entity) { 8 | 9 | } 10 | 11 | CAtmosphere::~CAtmosphere() { 12 | 13 | } 14 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/CAtmosphere.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Component.h" 3 | #include "Math/Math.h" 4 | 5 | namespace gear { 6 | class CAtmosphere : public Component { 7 | public: 8 | CAtmosphere(Entity* entity); 9 | 10 | virtual ~CAtmosphere(); 11 | 12 | static ComponentType GetClassType() { return ComponentType::Atmosphere; } 13 | 14 | ComponentType GetType() override { return ComponentType::Atmosphere; } 15 | 16 | void ShouldRenderAtmosphere(bool enable) { should_render_atmosphere = enable; }; 17 | 18 | private: 19 | friend class Scene; 20 | bool should_render_atmosphere = true; 21 | }; 22 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/CLight.cpp: -------------------------------------------------------------------------------- 1 | #include "CLight.h" 2 | #include "Entity/Entity.h" 3 | 4 | namespace gear { 5 | CLight::CLight(Entity* entity) 6 | :Component(entity) { 7 | } 8 | 9 | CLight::~CLight() { 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/CSkybox.cpp: -------------------------------------------------------------------------------- 1 | #include "CSkybox.h" 2 | #include "Entity/Entity.h" 3 | 4 | namespace gear { 5 | CSkybox::CSkybox(Entity* entity) 6 | :Component(entity) { 7 | } 8 | 9 | CSkybox::~CSkybox() { 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/CSkybox.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Component.h" 3 | #include "Math/Math.h" 4 | #include 5 | 6 | namespace gear { 7 | class Entity; 8 | class CSkybox : public Component { 9 | public: 10 | CSkybox(Entity* entity); 11 | 12 | virtual ~CSkybox(); 13 | 14 | static ComponentType GetClassType() { return ComponentType::Skybox; } 15 | 16 | ComponentType GetType() override { return ComponentType::Skybox; } 17 | 18 | void SetCubeMap(std::shared_ptr in_cube_map) { cube_map = in_cube_map; } 19 | 20 | std::shared_ptr GetCubeMap() { return cube_map; } 21 | 22 | private: 23 | std::shared_ptr cube_map; 24 | }; 25 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/Component.cpp: -------------------------------------------------------------------------------- 1 | #include "Component.h" 2 | #include "../Entity.h" 3 | 4 | namespace gear { 5 | Component::Component(Entity* entity) { 6 | _entity = entity; 7 | _type = ComponentType::None; 8 | } 9 | 10 | Component::~Component() { 11 | } 12 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Components/Component.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | namespace gear { 4 | enum class ComponentType { 5 | None, 6 | Transform, 7 | Renderable, 8 | Camera, 9 | Light, 10 | Mesh, 11 | Skybox, 12 | Animation, 13 | Atmosphere, 14 | }; 15 | 16 | class Entity; 17 | 18 | class Component { 19 | public: 20 | Component(Entity*); 21 | 22 | virtual ~Component(); 23 | 24 | virtual void Initialized() {} 25 | 26 | virtual void Update(float dt) {} 27 | 28 | virtual void Destroyed() {} 29 | 30 | virtual void OnNodeDirty() {} 31 | 32 | static ComponentType GetClassType() { return ComponentType::None; } 33 | 34 | virtual ComponentType GetType() { return _type; } 35 | 36 | protected: 37 | Entity* _entity; 38 | ComponentType _type; 39 | }; 40 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Entity.cpp: -------------------------------------------------------------------------------- 1 | #include "Entity.h" 2 | 3 | namespace gear { 4 | Entity::Entity(const std::string &name) { 5 | _name = name; 6 | } 7 | 8 | Entity::~Entity() { 9 | for (int i = 0; i < _components.size(); ++i) { 10 | delete _components[i]; 11 | _components[i] = nullptr; 12 | } 13 | _components.clear(); 14 | } 15 | 16 | std::shared_ptr Entity::Create(const std::string &name) { 17 | return std::make_shared(name); 18 | } 19 | 20 | std::string Entity::GetName() { 21 | return _name; 22 | } 23 | } -------------------------------------------------------------------------------- /Engine/Source/Entity/Scene.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Utility/Event.h" 3 | #include "Renderer/RenderData.h" 4 | 5 | #include 6 | 7 | #include 8 | 9 | namespace gear { 10 | class Entity; 11 | class Scene { 12 | public: 13 | Scene(const std::string& name); 14 | 15 | ~Scene(); 16 | 17 | void AddEntity(std::shared_ptr); 18 | 19 | void RemoveEntity(std::shared_ptr); 20 | 21 | static std::shared_ptr Create(const std::string& name); 22 | 23 | private: 24 | bool Prepare(blast::GfxCommandBuffer* cmd); 25 | 26 | private: 27 | friend class Renderer; 28 | std::string name; 29 | std::vector> entities; 30 | 31 | // Render 32 | uint32_t num_mesh_entitys = 0; 33 | uint32_t num_mesh_renderables = 0; 34 | std::vector mesh_renderables; 35 | std::vector renderables; 36 | std::vector renderables_storage; 37 | 38 | CameraInfo display_camera_info; 39 | CameraInfo main_camera_info; 40 | LightInfo light_info; 41 | 42 | bool should_render_atmosphere = false; 43 | AtmosphereParameters atmosphere_parameters; 44 | 45 | blast::GfxBuffer* renderables_ub = nullptr; 46 | 47 | blast::GfxTexture* skybox_map = nullptr; 48 | }; 49 | } -------------------------------------------------------------------------------- /Engine/Source/GearEngine.cpp: -------------------------------------------------------------------------------- 1 | #include "GearEngine.h" 2 | #include "Renderer/Renderer.h" 3 | #include "MaterialCompiler/MaterialCompiler.h" 4 | #include "Resource/BuiltinResources.h" 5 | #include "Input/InputSystem.h" 6 | #include "JobSystem/JobSystem.h" 7 | #include "Animation/AnimationSystem.h" 8 | 9 | namespace gear { 10 | GearEngine::GearEngine() { 11 | renderer = new Renderer(); 12 | material_compiler = new MaterialCompiler(); 13 | builtin_resources = new BuiltinResources(); 14 | input_system = new InputSystem(); 15 | animation_system = new AnimationSystem(); 16 | job_system = new JobSystem(MAX_THREADS); 17 | } 18 | 19 | GearEngine::~GearEngine() { 20 | SAFE_DELETE(animation_system); 21 | SAFE_DELETE(job_system); 22 | SAFE_DELETE(input_system); 23 | SAFE_DELETE(material_compiler); 24 | SAFE_DELETE(builtin_resources); 25 | SAFE_DELETE(renderer); 26 | } 27 | 28 | GearEngine gEngine; 29 | } -------------------------------------------------------------------------------- /Engine/Source/GearEngine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Core/GearDefine.h" 3 | 4 | namespace gear { 5 | class Renderer; 6 | class MaterialCompiler; 7 | class BuiltinResources; 8 | class InputSystem; 9 | class JobSystem; 10 | class AnimationSystem; 11 | class GearEngine { 12 | public: 13 | GearEngine(); 14 | 15 | ~GearEngine(); 16 | 17 | Renderer* GetRenderer() { return renderer; } 18 | 19 | MaterialCompiler* GetMaterialCompiler() { return material_compiler;} 20 | 21 | BuiltinResources* GetBuiltinResources() { return builtin_resources; } 22 | 23 | InputSystem* GetInputSystem() { return input_system; } 24 | 25 | JobSystem* GetJobSystem() { return job_system; } 26 | 27 | AnimationSystem* GetAnimationSystem() { return animation_system; } 28 | 29 | private: 30 | Renderer* renderer = nullptr; 31 | MaterialCompiler* material_compiler = nullptr; 32 | BuiltinResources* builtin_resources = nullptr; 33 | InputSystem* input_system = nullptr; 34 | JobSystem* job_system = nullptr; 35 | AnimationSystem* animation_system = nullptr; 36 | }; 37 | 38 | extern GearEngine gEngine; 39 | } -------------------------------------------------------------------------------- /Engine/Source/Input/InputSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Core/GearDefine.h" 3 | #include "Utility/Event.h" 4 | #include "Math/Math.h" 5 | 6 | namespace gear { 7 | class InputSystem { 8 | public: 9 | InputSystem(); 10 | 11 | ~InputSystem(); 12 | 13 | void Reset(); 14 | 15 | float GetMouseScrollWheel() { return _mouse_scroll_wheel; } 16 | 17 | bool GetMouseButtonHeld(uint8_t i) { return _mouse_button_held[i]; } 18 | 19 | bool GetMouseButtonDown(uint8_t i) { return _mouse_button_down[i]; } 20 | 21 | bool GetMouseButtonUp(uint8_t i) { return _mouse_button_up[i]; } 22 | 23 | glm::vec2 GetMousePosition() { return _mouse_position; } 24 | 25 | void OnMousePosition(float x, float y); 26 | 27 | void OnMouseButton(int button, int action); 28 | 29 | void OnMouseScroll(float offset); 30 | 31 | Event& GetOnMousePositionEvent(); 32 | 33 | Event& GetOnMouseButtonEvent(); 34 | 35 | Event& GetOnMouseScrollEvent(); 36 | 37 | private: 38 | float _mouse_scroll_wheel; 39 | bool _mouse_button_held[3]; 40 | bool _mouse_button_down[3]; 41 | bool _mouse_button_up[3]; 42 | glm::vec2 _mouse_position; 43 | Event _on_mouse_position_event; 44 | Event _on_mouse_button_event; 45 | Event _on_mouse_scroll_event; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /Engine/Source/JobSystem/JobSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #define MAX_THREADS 8 9 | 10 | namespace gear { 11 | class JobSystem { 12 | public: 13 | struct JobArgs { 14 | }; 15 | 16 | typedef std::function JobFunc; 17 | 18 | JobSystem(uint32_t num_threads); 19 | 20 | ~JobSystem(); 21 | 22 | void ExecuteJob(JobFunc func); 23 | 24 | bool IsJobSystemIdle(); 25 | 26 | void WaitIdleSystemIdle(); 27 | 28 | private: 29 | static void ThreadFunc(JobSystem*); 30 | 31 | private: 32 | volatile bool _run; 33 | uint32_t _num_threads; 34 | uint32_t _num_idle_threads; 35 | std::queue _jobs; 36 | std::thread _threads[MAX_THREADS]; 37 | std::mutex _queue_mutex; 38 | std::condition_variable _queue_cond; 39 | std::condition_variable _idle_cond; 40 | }; 41 | } -------------------------------------------------------------------------------- /Engine/Source/MaterialCompiler/MaterialCompiler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Resource/Material.h" 3 | #include 4 | #include 5 | 6 | namespace gear { 7 | class MaterialCompiler { 8 | public: 9 | MaterialCompiler(); 10 | 11 | ~MaterialCompiler(); 12 | 13 | std::shared_ptr Compile(const std::string& str, bool is_file); 14 | 15 | private: 16 | static void ProcessShadingModel(Material::Builder&, const std::string&); 17 | 18 | static void ProcessBlendingModel(Material::Builder&, const std::string&); 19 | 20 | private: 21 | using Callback = void(*)(Material::Builder*, const std::string&); 22 | std::unordered_map parameters; 23 | }; 24 | } -------------------------------------------------------------------------------- /Engine/Source/Math/Geometry.cpp: -------------------------------------------------------------------------------- 1 | #include "Geometry.h" 2 | 3 | namespace gear { 4 | } -------------------------------------------------------------------------------- /Engine/Source/Renderer/RenderData.cpp: -------------------------------------------------------------------------------- 1 | #include "RenderData.h" 2 | 3 | namespace gear { 4 | uint32_t GetVertexLayoutStride(VertexLayoutType vertex_layout) { 5 | switch(vertex_layout) { 6 | case VLT_P: 7 | return 12; 8 | break; 9 | case VLT_P_T0: 10 | return 20; 11 | break; 12 | case VLT_UI: 13 | return 20; 14 | break; 15 | case VLT_DEBUG: 16 | return 28; 17 | break; 18 | case VLT_STATIC_MESH: 19 | return 56; 20 | break; 21 | case VLT_SKIN_MESH: 22 | return 80; 23 | break; 24 | } 25 | return 0; 26 | } 27 | } -------------------------------------------------------------------------------- /Engine/Source/Resource/Shader.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Core/GearDefine.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace blast 9 | { 10 | enum ShaderStage; 11 | class GfxShader; 12 | } 13 | 14 | namespace gear { 15 | struct SimpleShaderDesc { 16 | blast::ShaderStage stage; 17 | std::string code; 18 | std::vector defines; 19 | }; 20 | 21 | class SimpleShader { 22 | public: 23 | SimpleShader(const SimpleShaderDesc& desc); 24 | 25 | ~SimpleShader(); 26 | 27 | std::shared_ptr GetShader(uint32_t variant = 0); 28 | 29 | protected: 30 | blast::ShaderStage stage; 31 | std::string code; 32 | std::vector defines; 33 | std::unordered_map> cache_shaders; 34 | }; 35 | } -------------------------------------------------------------------------------- /Engine/Source/UI/Canvas.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderer/RenderData.h" 3 | #include 4 | #include 5 | #include 6 | 7 | namespace gear { 8 | class VertexBuffer; 9 | class IndexBuffer; 10 | class MaterialInstance; 11 | class Canvas { 12 | public: 13 | struct Element { 14 | uint32_t count; 15 | uint32_t offset; 16 | MaterialInstance* mi; 17 | }; 18 | 19 | struct Batch { 20 | uint8_t* vertex_data = nullptr; 21 | uint32_t vertex_count = 0; 22 | VertexLayoutType vertex_layout; 23 | uint8_t* index_data = nullptr; 24 | uint32_t index_count = 0; 25 | blast::IndexType index_type; 26 | std::vector elements; 27 | }; 28 | 29 | public: 30 | Canvas(); 31 | 32 | ~Canvas(); 33 | 34 | void Begin(); 35 | 36 | void End(); 37 | 38 | void AddBatch(const Batch& batch); 39 | 40 | private: 41 | bool Prepare(blast::GfxCommandBuffer* cmd); 42 | 43 | private: 44 | friend class Renderer; 45 | std::vector batchs; 46 | std::vector> vertex_bufs; 47 | std::vector> index_bufs; 48 | std::vector draw_elements; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /Engine/Source/Utility/FileSystem.cpp: -------------------------------------------------------------------------------- 1 | #include "FileSystem.h" 2 | #include "Utility/Log.h" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace gear { 10 | std::string GetCurrentPath() { 11 | char buffer[1024]; 12 | getcwd(buffer, 1024); 13 | std::string path(buffer); 14 | return path; 15 | } 16 | 17 | std::string ReadFileData(const std::string& path) { 18 | std::istream* stream = &std::cin; 19 | std::ifstream file; 20 | 21 | file.open(path, std::ios_base::binary); 22 | stream = &file; 23 | if (file.fail()) { 24 | LOGW("cannot open input file %s \n", path.c_str()); 25 | return std::string(""); 26 | } 27 | return std::string((std::istreambuf_iterator(*stream)), std::istreambuf_iterator()); 28 | } 29 | } -------------------------------------------------------------------------------- /Engine/Source/Utility/FileSystem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Core/GearDefine.h" 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | namespace gear { 10 | std::string GetCurrentPath(); 11 | 12 | std::string ReadFileData(const std::string& path); 13 | } -------------------------------------------------------------------------------- /Engine/Source/Utility/Flags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef __cplusplus 4 | #ifndef MAKE_ENUM_FLAG 5 | #define MAKE_ENUM_FLAG(TYPE, ENUM_TYPE) \ 6 | static inline ENUM_TYPE operator|(ENUM_TYPE a, ENUM_TYPE b) { return (ENUM_TYPE)((TYPE)(a) | (TYPE)(b)); } \ 7 | static inline ENUM_TYPE operator&(ENUM_TYPE a, ENUM_TYPE b) { return (ENUM_TYPE)((TYPE)(a) & (TYPE)(b)); } \ 8 | static inline ENUM_TYPE operator|=(ENUM_TYPE& a, ENUM_TYPE b) { return a = (a | b); } \ 9 | static inline ENUM_TYPE operator&=(ENUM_TYPE& a, ENUM_TYPE b) { return a = (a & b); } 10 | #endif 11 | #else 12 | #define MAKE_ENUM_FLAG(TYPE, ENUM_TYPE) 13 | #endif -------------------------------------------------------------------------------- /Engine/Source/Utility/Hash.cpp: -------------------------------------------------------------------------------- 1 | #include "Utility/Hash.h" 2 | 3 | -------------------------------------------------------------------------------- /Engine/Source/Utility/Hash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | inline uint32_t murmur3(const uint32_t* key, size_t wordCount, uint32_t seed) noexcept { 6 | uint32_t h = seed; 7 | size_t i = wordCount; 8 | do { 9 | uint32_t k = *key++; 10 | k *= 0xcc9e2d51u; 11 | k = (k << 15u) | (k >> 17u); 12 | k *= 0x1b873593u; 13 | h ^= k; 14 | h = (h << 13u) | (h >> 19u); 15 | h = (h * 5u) + 0xe6546b64u; 16 | } while (--i); 17 | h ^= wordCount; 18 | h ^= h >> 16u; 19 | h *= 0x85ebca6bu; 20 | h ^= h >> 13u; 21 | h *= 0xc2b2ae35u; 22 | h ^= h >> 16u; 23 | return h; 24 | } 25 | 26 | template 27 | struct MurmurHash { 28 | uint32_t operator()(const T& key) const noexcept { 29 | static_assert(0 == (sizeof(key) & 3u), "Hashing requires a size that is a multiple of 4."); 30 | return murmur3((const uint32_t*) &key, sizeof(key) / 4, 0); 31 | } 32 | }; 33 | 34 | template 35 | void HashCombine(std::size_t& seed, const T& v) { 36 | std::hash hasher; 37 | seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); 38 | } 39 | -------------------------------------------------------------------------------- /Engine/Source/Utility/Log.h: -------------------------------------------------------------------------------- 1 | #ifndef LOG_H 2 | #define LOG_H 3 | #include 4 | 5 | #define LOGE(...) \ 6 | do \ 7 | { \ 8 | fprintf(stderr, "[ERROR]: " __VA_ARGS__); \ 9 | fflush(stderr); \ 10 | } while (false) 11 | 12 | #define LOGW(...) \ 13 | do \ 14 | { \ 15 | fprintf(stderr, "[WARN]: " __VA_ARGS__); \ 16 | fflush(stderr); \ 17 | } while (false) 18 | 19 | #define LOGI(...) \ 20 | do \ 21 | { \ 22 | fprintf(stderr, "[INFO]: " __VA_ARGS__); \ 23 | fflush(stderr); \ 24 | } while (false) 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Engine/Source/Utility/Slice.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | -------------------------------------------------------------------------------- /Engine/Source/Utility/UUID.cpp: -------------------------------------------------------------------------------- 1 | #include "Utility/UUID.h" 2 | 3 | #include 4 | #include 5 | 6 | std::string GenerateUUID() { 7 | UUID uuid{}; 8 | RPC_CSTR str = nullptr; 9 | 10 | UuidCreate(&uuid); 11 | UuidToStringA(&uuid, &str); 12 | 13 | std::string result(reinterpret_cast(str)); 14 | return result; 15 | } -------------------------------------------------------------------------------- /Engine/Source/Utility/UUID.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | std::string GenerateUUID(); -------------------------------------------------------------------------------- /Engine/Source/Window/BaseWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "BaseWindow.h" 2 | #include "GearEngine.h" 3 | #include "Renderer/Renderer.h" 4 | 5 | #include 6 | #include 7 | 8 | namespace gear { 9 | BaseWindow::BaseWindow() { 10 | } 11 | 12 | BaseWindow::~BaseWindow() { 13 | if (swapchain) { 14 | SAFE_DELETE(swapchain); 15 | } 16 | } 17 | 18 | blast::GfxSwapChain* BaseWindow::GetSwapChain() { 19 | // 如果当前窗口尺寸与交换链不一致则重新创建交换链,若当前窗口最小化则返回nullptr 20 | if (width == 0 ||height == 0) { 21 | return nullptr; 22 | } 23 | 24 | bool should_recreate = false; 25 | if (!swapchain) { 26 | should_recreate = true; 27 | } else { 28 | if (swapchain->desc.width != width || swapchain->desc.height != height) { 29 | should_recreate = true; 30 | } 31 | } 32 | 33 | if (should_recreate) { 34 | blast::GfxSwapChainDesc swapchain_desc; 35 | swapchain_desc.window = window_ptr; 36 | swapchain_desc.width = width; 37 | swapchain_desc.height = height; 38 | swapchain = gEngine.GetRenderer()->GetDevice()->CreateSwapChain(swapchain_desc, swapchain); 39 | } 40 | 41 | return swapchain; 42 | } 43 | } -------------------------------------------------------------------------------- /Engine/Source/Window/BaseWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Core/GearDefine.h" 3 | #include 4 | 5 | namespace blast { 6 | class GfxSwapChain; 7 | } 8 | 9 | namespace gear { 10 | class View; 11 | 12 | class BaseWindow { 13 | public: 14 | BaseWindow(); 15 | 16 | ~BaseWindow(); 17 | 18 | uint32_t GetWidth() { return width; } 19 | 20 | uint32_t GetHeight() { return height; } 21 | 22 | protected: 23 | blast::GfxSwapChain* GetSwapChain(); 24 | 25 | protected: 26 | friend class View; 27 | friend class Renderer; 28 | friend class BaseApplication; 29 | void* window_ptr = nullptr; 30 | uint32_t width = 0; 31 | uint32_t height = 0; 32 | blast::GfxSwapChain* swapchain = nullptr; 33 | }; 34 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 PYZ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GearEngine 2 | GearEngine is a rendering framework. 3 | 4 | Render hardware interface: [Blast](https://github.com/hipiPan/Blast/tree/main). 5 | 6 | Demo project: [GearEngineDemoProject](https://github.com/hipiPan/GearEngineDemoProject). 7 | 8 |
9 | 10 | # Screenshots 11 | ![image](https://github.com/hipiPan/GearEngine/blob/master/Screenshots/3.png) 12 | 13 |
14 | 15 | ## Atmosphere 16 | Based on this project: 17 | [UnrealEngineSkyAtmosphere](https://github.com/sebh/UnrealEngineSkyAtmosphere) 18 | 19 | ![image](https://github.com/hipiPan/GearEngine/blob/master/Screenshots/Atmosphere1.png) 20 | 21 | ![image](https://github.com/hipiPan/GearEngine/blob/master/Screenshots/Atmosphere2.png) -------------------------------------------------------------------------------- /Screenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Screenshots/3.png -------------------------------------------------------------------------------- /Screenshots/Atmosphere1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Screenshots/Atmosphere1.png -------------------------------------------------------------------------------- /Screenshots/Atmosphere2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowP12/GearEngine/88643f8f6fcc8a87955a9da6dff12f19f0c394d0/Screenshots/Atmosphere2.png -------------------------------------------------------------------------------- /Tools/UpdateMaterialCode.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import json 4 | 5 | material_file = os.path.join(os.getcwd(), sys.argv[1] + '.mat') 6 | vs_file = os.path.join(os.getcwd(), sys.argv[1] + '.vs') 7 | fs_file = os.path.join(os.getcwd(), sys.argv[1] + '.fs') 8 | print(material_file) 9 | print(vs_file) 10 | print(fs_file) 11 | 12 | vs_code = '' 13 | if os.path.exists(vs_file): 14 | with open(vs_file, 'r') as f: 15 | vs_code = f.read() 16 | 17 | fs_code = '' 18 | if os.path.exists(fs_file): 19 | with open(fs_file, 'r') as f: 20 | fs_code = f.read() 21 | 22 | if os.path.exists(material_file): 23 | material_dict = {} 24 | with open(material_file, 'r') as f: 25 | material_dict = json.loads(f.read()) 26 | 27 | if 'vertex_code' in material_dict: 28 | material_dict['vertex_code'] = vs_code 29 | 30 | if 'fragment_code' in material_dict: 31 | material_dict['fragment_code'] = fs_code 32 | 33 | with open(material_file, 'w') as f: 34 | f.write(json.dumps(material_dict, indent=4)) --------------------------------------------------------------------------------