├── CMakeLists.txt ├── HLMSEditor.png ├── HLMSEditor.pro ├── HLMSEditor2.png ├── README.md ├── bin ├── AssImpPlugin.dll ├── HLMSEditor.exe ├── JsonExport.dll ├── OgreHlmsPbs.dll ├── OgreHlmsUnlit.dll ├── OgreMain.dll ├── OgreMeshLodGenerator.dll ├── OgreMeshTool.exe ├── OgrePlanarReflections.dll ├── ProjectImportExport.dll ├── Qt5Core.dll ├── Qt5Gui.dll ├── Qt5Multimedia.dll ├── Qt5Network.dll ├── Qt5OpenGL.dll ├── Qt5Widgets.dll ├── RenderSystem_Direct3D11.dll ├── RenderSystem_GL3Plus.dll ├── RenderSystem_NULL.dll ├── TODO.txt ├── ZipExport.dll ├── assimp-vc140-mt.dll ├── dark.qss ├── gLTFImport.dll ├── gLTFImport_d.dll ├── imageformats │ ├── qgif.dll │ ├── qicns.dll │ ├── qico.dll │ ├── qjpeg.dll │ ├── qsvg.dll │ ├── qtga.dll │ ├── qtiff.dll │ ├── qwbmp.dll │ └── qwebp.dll ├── models.cfg ├── platforms │ └── qwindows.dll ├── plugins.cfg ├── plugins_d.cfg ├── plugins_tools.cfg ├── resources.cfg ├── resources_d.cfg ├── resources_default.cfg ├── settings.cfg └── settings_default.cfg ├── common ├── brushes │ ├── brush_001.png │ ├── brush_002.png │ ├── brush_002a_n.png │ ├── brush_002b_n.png │ ├── brush_003.png │ ├── brush_003_n.png │ ├── brush_004.png │ ├── brush_004_n.png │ ├── brush_005.png │ ├── brush_005_n.png │ ├── brush_006.png │ ├── brush_007.png │ ├── brush_007_n.png │ ├── brush_008.png │ ├── brush_009.png │ ├── brush_009_n.png │ ├── brush_010.png │ ├── brush_010_n.png │ ├── brush_011.png │ ├── brush_011_n.png │ ├── brush_012.png │ ├── brush_012_n.png │ ├── brush_013.png │ ├── brush_013_n.png │ ├── brush_014.png │ ├── brush_014_n.png │ └── smiley.png ├── clipboard │ └── README.md ├── icons │ ├── HLMSEditor.ico │ ├── HLMSEditor.png │ ├── blendblock.png │ ├── close.png │ ├── close_bold.png │ ├── collapse.png │ ├── color_bold.png │ ├── colour.png │ ├── expand.png │ ├── generate.png │ ├── hoover_off.png │ ├── hoover_on.png │ ├── icons.psd │ ├── info.png │ ├── lightbulb.png │ ├── macroblock.png │ ├── marker.png │ ├── minmax.png │ ├── model.png │ ├── move_off.png │ ├── move_on.png │ ├── noImage.png │ ├── paint_off.png │ ├── paint_on.png │ ├── pbs.png │ ├── pbs_banner.png │ ├── pbs_small.png │ ├── pin.png │ ├── redo.png │ ├── redo_off.png │ ├── redo_on.png │ ├── samplerblock.png │ ├── samplerblock_banner.png │ ├── samplerblock_small.png │ ├── search_bold.png │ ├── undo.png │ ├── undo_off.png │ ├── undo_on.png │ ├── unlit.png │ ├── unlit_small.png │ ├── view_invisible_bold.png │ └── view_visible_bold.png ├── info │ ├── blendblock.inf │ ├── hlms_pbs.inf │ ├── hlms_unlit.inf │ ├── macroblock.inf │ └── samplerblock.inf ├── ogre3 │ ├── Hlms │ │ ├── Common │ │ │ ├── Any │ │ │ │ ├── Cubemap_piece_all.any │ │ │ │ ├── ShadowCaster_piece_ps.any │ │ │ │ └── ShadowCaster_piece_vs.any │ │ │ ├── GLSL │ │ │ │ ├── CrossPlatformSettings_piece_all.glsl │ │ │ │ ├── Matrix_piece_all.glsl │ │ │ │ ├── QuaternionCode_piece_all.glsl │ │ │ │ └── RenderDepthOnly_piece_ps.glsl │ │ │ ├── HLSL │ │ │ │ ├── CrossPlatformSettings_piece_all.hlsl │ │ │ │ ├── Matrix_piece_all.hlsl │ │ │ │ ├── QuaternionCode_piece_all.hlsl │ │ │ │ └── RenderDepthOnly_piece_ps.hlsl │ │ │ └── Metal │ │ │ │ ├── CrossPlatformSettings_piece_all.metal │ │ │ │ ├── Matrix_piece_all.metal │ │ │ │ ├── QuaternionCode_piece_all.metal │ │ │ │ └── RenderDepthOnly_piece_ps.metal │ │ ├── Pbs │ │ │ ├── Any │ │ │ │ ├── PlanarReflections_piece_all.any │ │ │ │ ├── PlanarReflections_piece_ps.any │ │ │ │ ├── ShadowMapping_piece_ps.any │ │ │ │ └── ShadowMapping_piece_vs.any │ │ │ ├── GLSL │ │ │ │ ├── BRDFs_piece_ps.glsl │ │ │ │ ├── BlendModes_piece_ps.glsl │ │ │ │ ├── DetailMaps_piece_ps.glsl │ │ │ │ ├── Forward3D_piece_ps.glsl │ │ │ │ ├── IrradianceVolume_piece_ps.glsl │ │ │ │ ├── PixelShader_ps.glsl │ │ │ │ ├── Structs_piece_vs_piece_ps.glsl │ │ │ │ ├── Textures_piece_ps.glsl │ │ │ │ └── VertexShader_vs.glsl │ │ │ ├── HLSL │ │ │ │ ├── BRDFs_piece_ps.hlsl │ │ │ │ ├── BlendModes_piece_ps.hlsl │ │ │ │ ├── DetailMaps_piece_ps.hlsl │ │ │ │ ├── Forward3D_piece_ps.hlsl │ │ │ │ ├── IrradianceVolume_piece_ps.hlsl │ │ │ │ ├── PixelShader_ps.hlsl │ │ │ │ ├── Structs_piece_vs_piece_ps.hlsl │ │ │ │ ├── Textures_piece_ps.hlsl │ │ │ │ └── VertexShader_vs.hlsl │ │ │ └── Metal │ │ │ │ ├── BRDFs_piece_ps.metal │ │ │ │ ├── BlendModes_piece_ps.metal │ │ │ │ ├── DetailMaps_piece_ps.metal │ │ │ │ ├── Forward3D_piece_ps.metal │ │ │ │ ├── IrradianceVolume_piece_ps.metal │ │ │ │ ├── PixelShader_ps.metal │ │ │ │ ├── Structs_piece_vs_piece_ps.metal │ │ │ │ ├── Textures_piece_ps.metal │ │ │ │ └── VertexShader_vs.metal │ │ ├── PbsMobile │ │ │ └── GLSL │ │ │ │ ├── BlendModes_piece_ps.glsl │ │ │ │ ├── PixelShader_ps.glsl │ │ │ │ └── VertexShader_vs.glsl │ │ ├── Terra │ │ │ ├── GLSL │ │ │ │ ├── PbsTerraShadows │ │ │ │ │ └── PbsTerraShadows_piece_vs_piece_ps.glsl │ │ │ │ ├── PixelShader_ps.glsl │ │ │ │ ├── Structs_piece_vs_piece_ps.glsl │ │ │ │ ├── Textures_piece_ps.glsl │ │ │ │ └── VertexShader_vs.glsl │ │ │ └── HLSL │ │ │ │ ├── PbsTerraShadows │ │ │ │ └── PbsTerraShadows_piece_vs_piece_ps.hlsl │ │ │ │ ├── PixelShader_ps.hlsl │ │ │ │ ├── Structs_piece_vs_piece_ps.hlsl │ │ │ │ ├── Textures_piece_ps.hlsl │ │ │ │ └── VertexShader_vs.hlsl │ │ ├── Unlit │ │ │ ├── Any │ │ │ │ └── StructsUnlit_piece_all.any │ │ │ ├── GLSL │ │ │ │ ├── BlendModes_piece_ps.glsl │ │ │ │ ├── PixelShader_ps.glsl │ │ │ │ ├── Structs_piece_vs_piece_ps.glsl │ │ │ │ └── VertexShader_vs.glsl │ │ │ ├── HLSL │ │ │ │ ├── BlendModes_piece_ps.hlsl │ │ │ │ ├── PixelShader_ps.hlsl │ │ │ │ ├── Structs_piece_vs_piece_ps.hlsl │ │ │ │ └── VertexShader_vs.hlsl │ │ │ └── Metal │ │ │ │ ├── BlendModes_piece_ps.metal │ │ │ │ ├── PixelShader_ps.metal │ │ │ │ ├── Structs_piece_vs_piece_ps.metal │ │ │ │ └── VertexShader_vs.metal │ │ └── UnlitMobile │ │ │ └── GLSL │ │ │ ├── BlendModes_piece_ps.glsl │ │ │ ├── CrossPlatformSettings_piece_ps.glsl │ │ │ ├── CrossPlatformSettings_piece_vs.glsl │ │ │ ├── PixelShader_ps.glsl │ │ │ └── VertexShader_vs.glsl │ ├── axis.mesh │ ├── barrel.mesh │ ├── cube.mesh │ ├── knot.mesh │ ├── materialball.mesh │ ├── rock.mesh │ ├── sphere.mesh │ └── uv_mapping.png ├── presets │ └── alumininium │ │ ├── aluminium.material.json │ │ ├── aluminium.material.json.png │ │ ├── aluminum_normal.png │ │ └── aluminum_roughness.png ├── skybox │ ├── FortPoint.dds │ ├── Lundagatan.dds │ ├── SkyBoxNone.dds │ ├── SkyPostprocess.compositor │ ├── SkyPostprocess.material │ ├── SkyPostprocess_ps.glsl │ ├── SkyPostprocess_ps.hlsl │ ├── SkyPostprocess_vs.glsl │ ├── SkyPostprocess_vs.hlsl │ ├── Tantolunden.dds │ └── Teide.dds └── thumbs │ ├── 10Pbs.material.json.png │ ├── BumpyMetalUnlit.material.json.png │ ├── CheckerPbs.material.json.png │ └── StonesPbs.material.json.png ├── doc ├── HLMS Editor Cheat Sheet.docx ├── HLMS Editor Cheat Sheet.pdf ├── LICENSE - FreePBR.com and SketchUp Textures ├── LICENSE - HLMS Editor.txt ├── LICENSE - Open Asset Import Library └── tests.txt ├── examples ├── 10Pbs.material.json ├── 10points.png ├── 1d_debug.png ├── BumpyMetal.jpg ├── BumpyMetalUnlit.material.json ├── CheckerPbs.material.json ├── StonesPbs.material.json ├── checker.png ├── example_project.hlmp ├── example_project_materials.cfg ├── example_project_textures.cfg ├── floor_ao.PNG ├── floor_bump.PNG ├── floor_diffuse.PNG └── floor_specular.PNG ├── framework ├── header │ ├── asset_assetconstants.h │ ├── asset_assetwidget.h │ ├── asset_clickableframe.h │ ├── asset_clickablelabel.h │ ├── asset_containerwidget.h │ ├── asset_curve_dialog.h │ ├── asset_curve_grid.h │ ├── asset_propertywidget.h │ ├── asset_propertywidget_checkbox.h │ ├── asset_propertywidget_color.h │ ├── asset_propertywidget_curve.h │ ├── asset_propertywidget_decimal.h │ ├── asset_propertywidget_quaternion.h │ ├── asset_propertywidget_select.h │ ├── asset_propertywidget_slider.h │ ├── asset_propertywidget_slider_decimal.h │ ├── asset_propertywidget_string.h │ ├── asset_propertywidget_texture.h │ ├── asset_propertywidget_xy.h │ ├── asset_propertywidget_xyz.h │ ├── magus_core.h │ ├── magus_treewidget.h │ ├── node_compound.h │ ├── node_connection.h │ ├── node_constants.h │ ├── node_editorwidget.h │ ├── node_node.h │ ├── node_port.h │ ├── node_porttype.h │ ├── node_scene.h │ ├── node_view.h │ ├── ogre3_cameraman.h │ ├── ogre3_renderman.h │ ├── ogre3_widget.h │ ├── ogre_prereqs.h │ ├── tb_transformationwidget.h │ ├── tool_default_texturewidget.h │ ├── tool_generic_assetwidget.h │ └── tool_resourcetree_widget.h └── src │ ├── asset_assetwidget.cpp │ ├── asset_containerwidget.cpp │ ├── asset_curve_dialog.cpp │ ├── asset_curve_grid.cpp │ ├── asset_propertywidget_checkbox.cpp │ ├── asset_propertywidget_color.cpp │ ├── asset_propertywidget_curve.cpp │ ├── asset_propertywidget_decimal.cpp │ ├── asset_propertywidget_quaternion.cpp │ ├── asset_propertywidget_select.cpp │ ├── asset_propertywidget_slider.cpp │ ├── asset_propertywidget_slider_decimal.cpp │ ├── asset_propertywidget_string.cpp │ ├── asset_propertywidget_texture.cpp │ ├── asset_propertywidget_xy.cpp │ ├── asset_propertywidget_xyz.cpp │ ├── magus_treewidget.cpp │ ├── node_compound.cpp │ ├── node_connection.cpp │ ├── node_editorwidget.cpp │ ├── node_node.cpp │ ├── node_port.cpp │ ├── node_porttype.cpp │ ├── ogre3_renderman.cpp │ ├── ogre3_widget.cpp │ ├── tb_transformationwidget.cpp │ ├── tool_default_texturewidget.cpp │ ├── tool_generic_assetwidget.cpp │ └── tool_resourcetree_widget.cpp ├── import └── README.md ├── source ├── header │ ├── brush_preset_dockwidget.h │ ├── brush_widget.h │ ├── central_dockwidget.h │ ├── clipboard_widget.h │ ├── config_dialog.h │ ├── config_pages.h │ ├── constants.h │ ├── hlms_builder.h │ ├── hlms_editor_plugin.h │ ├── hlms_editor_plugin_action.h │ ├── hlms_editor_plugin_properties_dialog.h │ ├── hlms_node_blenddblock.h │ ├── hlms_node_macroblock.h │ ├── hlms_node_pbs_datablock.h │ ├── hlms_node_porttypes.h │ ├── hlms_node_samplerblock.h │ ├── hlms_node_unlit_datablock.h │ ├── hlms_pbs_builder.h │ ├── hlms_properties_blenddblock.h │ ├── hlms_properties_macroblock.h │ ├── hlms_properties_pbs_datablock.h │ ├── hlms_properties_samplerblock.h │ ├── hlms_properties_unlit_datablock.h │ ├── hlms_unlit_builder.h │ ├── hlms_utils_manager.h │ ├── mainwindow.h │ ├── material_browser.h │ ├── material_browser_dialog.h │ ├── material_main.h │ ├── material_thumbs.h │ ├── material_tree.h │ ├── nodeeditor_dockwidget.h │ ├── paint_dockwidget.h │ ├── paintlayer.h │ ├── paintlayer_dialog.h │ ├── paintlayer_dockwidget.h │ ├── paintlayer_manager.h │ ├── paintlayer_widget.h │ ├── preset_widget.h │ ├── properties_dockwidget.h │ ├── recent_file_action.h │ ├── renderwindow_dockwidget.h │ ├── texture_dockwidget.h │ ├── texture_main.h │ ├── texture_thumbs.h │ ├── texture_tree.h │ ├── texturelayer.h │ └── texturelayer_manager.h └── src │ ├── brush_preset_dockwidget.cpp │ ├── brush_widget.cpp │ ├── central_dockwidget.cpp │ ├── clipboard_widget.cpp │ ├── config_dialog.cpp │ ├── config_pages.cpp │ ├── hlms_builder.cpp │ ├── hlms_editor_plugin_action.cpp │ ├── hlms_editor_plugin_properties_dialog.cpp │ ├── hlms_node_blenddblock.cpp │ ├── hlms_node_macroblock.cpp │ ├── hlms_node_pbs_datablock.cpp │ ├── hlms_node_porttypes.cpp │ ├── hlms_node_samplerblock.cpp │ ├── hlms_node_unlit_datablock.cpp │ ├── hlms_pbs_builder.cpp │ ├── hlms_properties_blenddblock.cpp │ ├── hlms_properties_macroblock.cpp │ ├── hlms_properties_pbs_datablock.cpp │ ├── hlms_properties_samplerblock.cpp │ ├── hlms_properties_unlit_datablock.cpp │ ├── hlms_unlit_builder.cpp │ ├── hlms_utils_manager.cpp │ ├── main.cpp │ ├── mainwindow.cpp │ ├── material_browser.cpp │ ├── material_browser_dialog.cpp │ ├── material_main.cpp │ ├── material_thumbs.cpp │ ├── material_tree.cpp │ ├── nodeeditor_dockwidget.cpp │ ├── paint_dockwidget.cpp │ ├── paintlayer.cpp │ ├── paintlayer_dialog.cpp │ ├── paintlayer_dockwidget.cpp │ ├── paintlayer_manager.cpp │ ├── paintlayer_widget.cpp │ ├── preset_widget.cpp │ ├── properties_dockwidget.cpp │ ├── recent_file_action.cpp │ ├── renderwindow_dockwidget.cpp │ ├── texture_dockwidget.cpp │ ├── texture_main.cpp │ ├── texture_thumbs.cpp │ ├── texture_tree.cpp │ ├── texturelayer.cpp │ └── texturelayer_manager.cpp └── temp └── README.md /HLMSEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/HLMSEditor.png -------------------------------------------------------------------------------- /HLMSEditor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/HLMSEditor2.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HLMS Editor 2 | Editor to create Ogre3D High Level Material Shader materials (Ogre 2.0+). The editor supports fast creation of PBS and Unlit type materials and offers layered painting of materials, using different brushes and various painting effects (colour painting, alpha painting, carbon copy, smudge, etc...). A plugin system provides import- and export functions, which makes it possible to export the materials and textures to a zip file, which can be directly used in an Ogre-based application. 3 | 4 | ![HLMS Editor](/HLMSEditor.png) 5 | 6 | **Installation:** 7 | Step 1. Download the zip or clone the 'HLMSEditor' repository from Github. 8 | Step 2. Compile the sources of Ogre3D version 2.1 (from https://bitbucket.org/sinbad/ogre) 9 | Step 3. Copy the following Ogre 2.1 DLL's/EXE's to the HLMSEditor/bin directory 10 | * OgreHlmsPbs.dll 11 | * OgreHlmsPbs_d.dll 12 | * OgreHlmsUnlit.dll 13 | * OgreHlmsUnlit_d.dll 14 | * OgreMain.dll 15 | * OgreMain_d.dll 16 | * RenderSystem_Direct3D11.dll 17 | * RenderSystem_Direct3D11_d.dll 18 | * RenderSystem_GL3Plus.dll 19 | * RenderSystem_GL3Plus_d.dll 20 | * RenderSystem_NULL.dll 21 | * RenderSystem_NULL_d.dll 22 | * OgreMeshLodGenerator.dll 23 | * OgreMeshTool.exe 24 | 25 | Step 4. Copy the following Qt (5.x) DLL's to the HLMSEditor/bin directory 26 | * Qt5Core.dll 27 | * Qt5Gui.dll 28 | * Qt5Multimedia.dll 29 | * Qt5Network.dll 30 | * Qt5OpenGL.dll 31 | * Qt5Widgets.dll 32 | * platform/qwindows.dll (if you use windows, of course) 33 | * imageformats/qgif.dll 34 | * imageformats/qicns.dll 35 | * imageformats/qico.dll 36 | * imageformats/qjpeg.dll 37 | * imageformats/qsvg.dll 38 | * imageformats/qtga.dll 39 | * imageformats/qtiff.dll 40 | * imageformats/qwbmp.dll 41 | * imageformats/qwebp.dll 42 | 43 | Step 5a. Run 'Qt Creator' 44 | Step 6a. Open the 'HLMSEditor.pro' in Qt Creator 45 | Step 7a. Edit 'HLMSEditor.pro' file; change OGREHOME = "C:/Users/Henry/Documents/Visual Studio 2015/Projects/ogre" to the path that refers to your ogre root/home 46 | Step 8a. Run the HLMSEditor application 47 | Step 9a. Note, that you don't need the Qt dll files in your HLMSEditor/bin directory, unless the HLMSEditor application is used as stand-alone (outside Qt Creator). 48 | 49 | Or... 50 | Step 5b. Start CMake (download gui version on https://cmake.org/) 51 | Step 6b. Browse location 'Where is the source code' and 'Where to build the binaries' and click 'Configure' 52 | Step 7b. Click 'Generate' 53 | (note, that CMakeLists.txt may need some more attention) 54 | 55 | Note regarding cmake for Linux users: The CMakeLists.txt file expect that Ogre has been installed on the system in both Debug and Release modes. If you installed Ogre using "make install", you need to have built Ogre in Debug mode in an additional binary directory configured with `cmake -DCMAKE_BUILD_TYPE=Debug` 56 | 57 | -------------------------------------------------------------------------------- /bin/AssImpPlugin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/AssImpPlugin.dll -------------------------------------------------------------------------------- /bin/HLMSEditor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/HLMSEditor.exe -------------------------------------------------------------------------------- /bin/JsonExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/JsonExport.dll -------------------------------------------------------------------------------- /bin/OgreHlmsPbs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/OgreHlmsPbs.dll -------------------------------------------------------------------------------- /bin/OgreHlmsUnlit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/OgreHlmsUnlit.dll -------------------------------------------------------------------------------- /bin/OgreMain.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/OgreMain.dll -------------------------------------------------------------------------------- /bin/OgreMeshLodGenerator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/OgreMeshLodGenerator.dll -------------------------------------------------------------------------------- /bin/OgreMeshTool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/OgreMeshTool.exe -------------------------------------------------------------------------------- /bin/OgrePlanarReflections.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/OgrePlanarReflections.dll -------------------------------------------------------------------------------- /bin/ProjectImportExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/ProjectImportExport.dll -------------------------------------------------------------------------------- /bin/Qt5Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/Qt5Core.dll -------------------------------------------------------------------------------- /bin/Qt5Gui.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/Qt5Gui.dll -------------------------------------------------------------------------------- /bin/Qt5Multimedia.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/Qt5Multimedia.dll -------------------------------------------------------------------------------- /bin/Qt5Network.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/Qt5Network.dll -------------------------------------------------------------------------------- /bin/Qt5OpenGL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/Qt5OpenGL.dll -------------------------------------------------------------------------------- /bin/Qt5Widgets.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/Qt5Widgets.dll -------------------------------------------------------------------------------- /bin/RenderSystem_Direct3D11.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/RenderSystem_Direct3D11.dll -------------------------------------------------------------------------------- /bin/RenderSystem_GL3Plus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/RenderSystem_GL3Plus.dll -------------------------------------------------------------------------------- /bin/RenderSystem_NULL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/RenderSystem_NULL.dll -------------------------------------------------------------------------------- /bin/ZipExport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/ZipExport.dll -------------------------------------------------------------------------------- /bin/assimp-vc140-mt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/assimp-vc140-mt.dll -------------------------------------------------------------------------------- /bin/gLTFImport.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/gLTFImport.dll -------------------------------------------------------------------------------- /bin/gLTFImport_d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/gLTFImport_d.dll -------------------------------------------------------------------------------- /bin/imageformats/qgif.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qgif.dll -------------------------------------------------------------------------------- /bin/imageformats/qicns.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qicns.dll -------------------------------------------------------------------------------- /bin/imageformats/qico.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qico.dll -------------------------------------------------------------------------------- /bin/imageformats/qjpeg.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qjpeg.dll -------------------------------------------------------------------------------- /bin/imageformats/qsvg.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qsvg.dll -------------------------------------------------------------------------------- /bin/imageformats/qtga.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qtga.dll -------------------------------------------------------------------------------- /bin/imageformats/qtiff.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qtiff.dll -------------------------------------------------------------------------------- /bin/imageformats/qwbmp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qwbmp.dll -------------------------------------------------------------------------------- /bin/imageformats/qwebp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/imageformats/qwebp.dll -------------------------------------------------------------------------------- /bin/models.cfg: -------------------------------------------------------------------------------- 1 | Materialball materialball.mesh 5 5 5 2 | Cube cube.mesh 20 20 20 3 | Barrel barrel.mesh 10 10 10 4 | Sphere sphere.mesh 0.2 0.2 0.2 5 | Knot knot.mesh 0.4 0.4 0.4 6 | Rock rock.mesh 0.4 0.4 0.4 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /bin/platforms/qwindows.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/bin/platforms/qwindows.dll -------------------------------------------------------------------------------- /bin/plugins.cfg: -------------------------------------------------------------------------------- 1 | # Defines plugins to load 2 | 3 | # Define plugin folder 4 | PluginFolder=. 5 | 6 | # Define plugins 7 | #Plugin=RenderSystem_Direct3D11 8 | Plugin=RenderSystem_GL3Plus 9 | Plugin=ZipExport 10 | Plugin=ProjectImportExport 11 | Plugin=AssImpPlugin 12 | Plugin=gLTFImport 13 | -------------------------------------------------------------------------------- /bin/plugins_d.cfg: -------------------------------------------------------------------------------- 1 | # Defines plugins to load 2 | 3 | # Define plugin folder 4 | PluginFolder=. 5 | 6 | # Define plugins 7 | #Plugin=RenderSystem_Direct3D11_d 8 | Plugin=RenderSystem_GL3Plus_d 9 | Plugin=ZipExport_d 10 | Plugin=ProjectImportExport_d 11 | Plugin=AssImpPlugin_d 12 | Plugin=gLTFImport_d 13 | -------------------------------------------------------------------------------- /bin/plugins_tools.cfg: -------------------------------------------------------------------------------- 1 | # Defines plugins to load 2 | 3 | # Define plugin folder 4 | PluginFolder=. 5 | 6 | # Define plugins 7 | Plugin=RenderSystem_NULL 8 | -------------------------------------------------------------------------------- /bin/resources.cfg: -------------------------------------------------------------------------------- 1 | [Autodetect] 2 | [General] 3 | FileSystem = ../common/ogre3 4 | FileSystem = ../common/skybox 5 | FileSystem = ../common/brushes 6 | FileSystem = ../examples 7 | FileSystem = ../import 8 | FileSystem = ../temp 9 | FileSystem = ../import/scene 10 | [Internal] 11 | [Hlms] 12 | DoNotUseAsResource = ../common/ogre3 13 | -------------------------------------------------------------------------------- /bin/resources_d.cfg: -------------------------------------------------------------------------------- 1 | [Autodetect] 2 | [General] 3 | FileSystem = ../common/ogre3 4 | FileSystem = ../common/skybox 5 | FileSystem = ../common/brushes 6 | FileSystem = ../examples 7 | FileSystem = ../import 8 | FileSystem = ../temp 9 | [Internal] 10 | [Hlms] 11 | DoNotUseAsResource = ../common/ogre3 12 | 13 | -------------------------------------------------------------------------------- /bin/resources_default.cfg: -------------------------------------------------------------------------------- 1 | [Autodetect] 2 | [General] 3 | FileSystem = ../common/ogre3 4 | FileSystem = ../common/skybox 5 | FileSystem = ../common/brushes 6 | FileSystem = ../examples 7 | FileSystem = ../import 8 | FileSystem = ../temp 9 | [Internal] 10 | [Hlms] 11 | DoNotUseAsResource = ../common/ogre3 12 | -------------------------------------------------------------------------------- /bin/settings.cfg: -------------------------------------------------------------------------------- 1 | importPath = "../import/" 2 | samplerblockFilterIndex = "3" 3 | numberOfSkyboxes = "4" 4 | skybox0 = "FortPoint.dds" 5 | skybox1 = "Tantolunden.dds" 6 | skybox2 = "Teide.dds" 7 | skybox3 = "Lundagatan.dds" 8 | -------------------------------------------------------------------------------- /bin/settings_default.cfg: -------------------------------------------------------------------------------- 1 | importPath = "../import/" 2 | samplerblockFilterIndex = "3" 3 | numberOfSkyboxes = "4" 4 | skybox0 = "FortPoint.dds" 5 | skybox1 = "Tantolunden.dds" 6 | skybox2 = "Teide.dds" 7 | skybox3 = "Lundagatan.dds" 8 | -------------------------------------------------------------------------------- /common/brushes/brush_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_001.png -------------------------------------------------------------------------------- /common/brushes/brush_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_002.png -------------------------------------------------------------------------------- /common/brushes/brush_002a_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_002a_n.png -------------------------------------------------------------------------------- /common/brushes/brush_002b_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_002b_n.png -------------------------------------------------------------------------------- /common/brushes/brush_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_003.png -------------------------------------------------------------------------------- /common/brushes/brush_003_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_003_n.png -------------------------------------------------------------------------------- /common/brushes/brush_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_004.png -------------------------------------------------------------------------------- /common/brushes/brush_004_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_004_n.png -------------------------------------------------------------------------------- /common/brushes/brush_005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_005.png -------------------------------------------------------------------------------- /common/brushes/brush_005_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_005_n.png -------------------------------------------------------------------------------- /common/brushes/brush_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_006.png -------------------------------------------------------------------------------- /common/brushes/brush_007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_007.png -------------------------------------------------------------------------------- /common/brushes/brush_007_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_007_n.png -------------------------------------------------------------------------------- /common/brushes/brush_008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_008.png -------------------------------------------------------------------------------- /common/brushes/brush_009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_009.png -------------------------------------------------------------------------------- /common/brushes/brush_009_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_009_n.png -------------------------------------------------------------------------------- /common/brushes/brush_010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_010.png -------------------------------------------------------------------------------- /common/brushes/brush_010_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_010_n.png -------------------------------------------------------------------------------- /common/brushes/brush_011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_011.png -------------------------------------------------------------------------------- /common/brushes/brush_011_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_011_n.png -------------------------------------------------------------------------------- /common/brushes/brush_012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_012.png -------------------------------------------------------------------------------- /common/brushes/brush_012_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_012_n.png -------------------------------------------------------------------------------- /common/brushes/brush_013.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_013.png -------------------------------------------------------------------------------- /common/brushes/brush_013_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_013_n.png -------------------------------------------------------------------------------- /common/brushes/brush_014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_014.png -------------------------------------------------------------------------------- /common/brushes/brush_014_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/brush_014_n.png -------------------------------------------------------------------------------- /common/brushes/smiley.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/brushes/smiley.png -------------------------------------------------------------------------------- /common/clipboard/README.md: -------------------------------------------------------------------------------- 1 | # HLMS Editor 2 | 3 | This is a dir used for saving clips (e.g. samplerblocks) -------------------------------------------------------------------------------- /common/icons/HLMSEditor.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/HLMSEditor.ico -------------------------------------------------------------------------------- /common/icons/HLMSEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/HLMSEditor.png -------------------------------------------------------------------------------- /common/icons/blendblock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/blendblock.png -------------------------------------------------------------------------------- /common/icons/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/close.png -------------------------------------------------------------------------------- /common/icons/close_bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/close_bold.png -------------------------------------------------------------------------------- /common/icons/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/collapse.png -------------------------------------------------------------------------------- /common/icons/color_bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/color_bold.png -------------------------------------------------------------------------------- /common/icons/colour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/colour.png -------------------------------------------------------------------------------- /common/icons/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/expand.png -------------------------------------------------------------------------------- /common/icons/generate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/generate.png -------------------------------------------------------------------------------- /common/icons/hoover_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/hoover_off.png -------------------------------------------------------------------------------- /common/icons/hoover_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/hoover_on.png -------------------------------------------------------------------------------- /common/icons/icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/icons.psd -------------------------------------------------------------------------------- /common/icons/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/info.png -------------------------------------------------------------------------------- /common/icons/lightbulb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/lightbulb.png -------------------------------------------------------------------------------- /common/icons/macroblock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/macroblock.png -------------------------------------------------------------------------------- /common/icons/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/marker.png -------------------------------------------------------------------------------- /common/icons/minmax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/minmax.png -------------------------------------------------------------------------------- /common/icons/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/model.png -------------------------------------------------------------------------------- /common/icons/move_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/move_off.png -------------------------------------------------------------------------------- /common/icons/move_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/move_on.png -------------------------------------------------------------------------------- /common/icons/noImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/noImage.png -------------------------------------------------------------------------------- /common/icons/paint_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/paint_off.png -------------------------------------------------------------------------------- /common/icons/paint_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/paint_on.png -------------------------------------------------------------------------------- /common/icons/pbs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/pbs.png -------------------------------------------------------------------------------- /common/icons/pbs_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/pbs_banner.png -------------------------------------------------------------------------------- /common/icons/pbs_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/pbs_small.png -------------------------------------------------------------------------------- /common/icons/pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/pin.png -------------------------------------------------------------------------------- /common/icons/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/redo.png -------------------------------------------------------------------------------- /common/icons/redo_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/redo_off.png -------------------------------------------------------------------------------- /common/icons/redo_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/redo_on.png -------------------------------------------------------------------------------- /common/icons/samplerblock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/samplerblock.png -------------------------------------------------------------------------------- /common/icons/samplerblock_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/samplerblock_banner.png -------------------------------------------------------------------------------- /common/icons/samplerblock_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/samplerblock_small.png -------------------------------------------------------------------------------- /common/icons/search_bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/search_bold.png -------------------------------------------------------------------------------- /common/icons/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/undo.png -------------------------------------------------------------------------------- /common/icons/undo_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/undo_off.png -------------------------------------------------------------------------------- /common/icons/undo_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/undo_on.png -------------------------------------------------------------------------------- /common/icons/unlit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/unlit.png -------------------------------------------------------------------------------- /common/icons/unlit_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/unlit_small.png -------------------------------------------------------------------------------- /common/icons/view_invisible_bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/view_invisible_bold.png -------------------------------------------------------------------------------- /common/icons/view_visible_bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/icons/view_visible_bold.png -------------------------------------------------------------------------------- /common/info/blendblock.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/info/blendblock.inf -------------------------------------------------------------------------------- /common/info/hlms_pbs.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/info/hlms_pbs.inf -------------------------------------------------------------------------------- /common/info/hlms_unlit.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/info/hlms_unlit.inf -------------------------------------------------------------------------------- /common/info/macroblock.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/info/macroblock.inf -------------------------------------------------------------------------------- /common/info/samplerblock.inf: -------------------------------------------------------------------------------- 1 | **************************************** Texture / sampler **************************************** 2 | Samplerblocks hold information about texture units, like filtering options, addressing modes 3 | (wrap, clamp, etc), Lod bias, anisotropy, border colour, etc. They're analogous to 4 | D3D11_SAMPLER_DESC. 5 | 6 | Texture 7 | ======= 8 | Select an image file for this texture/sampler node. 9 | Note, that the resource location (directory) in which the image file is located, is added to the list 10 | of resource locations and stored in a configuration file. When the application is restarted and the 11 | image file is loaded again (When 'Open Hlms' is selected from the menu), the application searches the 12 | image file in one of the stored resource locations. 13 | 14 | Texture type 15 | ============ 16 | In case of PBS, a listbox is presented with the possible roles a texture can have (diffuse map, normal 17 | map, etc...). This property is not shown in case of Unlit. 18 | When in metal workflow, the 'Specular / Metallic map' texture is used as a metallic texture and is 19 | expected to be a monochrome texture. When in specular workflow, the 'Specular / Metallic map' texture 20 | is used as a specular texture and is expected to be either coloured or monochrome. 21 | 22 | Enabled 23 | ======= 24 | Enables/disables the texture from the Hlms. If set to disabled and the Hlms is generated, the texture 25 | is ignored. 26 | 27 | Min filter 28 | ========== 29 | 30 | 31 | Mag filter 32 | ========== 33 | 34 | 35 | Mip filter 36 | ========== 37 | 38 | 39 | Texture Addressing Mode U 40 | ========================= 41 | 42 | 43 | Texture Addressing Mode V 44 | ========================= 45 | 46 | 47 | Texture Addressing Mode W 48 | ========================= 49 | 50 | 51 | Mip LOD bias 52 | ============ 53 | 54 | 55 | Max anisotropy 56 | ============== 57 | 58 | 59 | Compare Function 60 | ================ 61 | 62 | 63 | Min LOD 64 | ======= 65 | 66 | 67 | Max LOD 68 | ======= 69 | 70 | 71 | Border colour [0..255] 72 | ====================== 73 | 74 | 75 | UV set [0..7] 76 | ============= 77 | Sets which UV set to use for the given texture. 78 | 79 | Blend mode 80 | ========== 81 | Sets the blending mode (how the texture unit gets layered on top of the previous texture units). 82 | In case of Unlit this applies to all attached textures/samplers.In case of PBS, blend mode are only 83 | used in case 'Texture type' = detail map 0, 1, 2 or 3. 84 | 85 | Map weight 86 | ========== 87 | In case of PBS: Sets the weight of detail map. Affects both diffuse and normal at the same time. 88 | This setting only has effect when 'Texture type' = detail map 0, 1, 2 or 3, or if 89 | 'Texture type' = detail normal map 0, 1, 2 or 3. 90 | Not applicable in case of Unlit. 91 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/Any/ShadowCaster_piece_ps.any: -------------------------------------------------------------------------------- 1 | 2 | //#include "SyntaxHighlightingMisc.h" 3 | 4 | ///-------------------------------------------------------------------------------------- 5 | /// Caster 6 | ///-------------------------------------------------------------------------------------- 7 | 8 | @piece( DeclShadowCasterMacros ) 9 | @property( syntax == glsl ) 10 | @property( !hlms_render_depth_only ) 11 | @property( GL3+ ) 12 | #define outDepth outColour 13 | @end 14 | @property( !GL3+ ) 15 | #define outDepth gl_FragColor 16 | @end 17 | @end 18 | @property( hlms_render_depth_only ) 19 | #define outDepth gl_FragDepth 20 | @end 21 | @end 22 | 23 | @property( syntax == hlsl || syntax == metal ) 24 | #define outDepth outPs.colour0 25 | @end 26 | @end 27 | 28 | @piece( DoShadowCastPS ) 29 | @property( (!hlms_shadow_uses_depth_texture || exponential_shadow_maps) && !hlms_shadowcaster_point ) 30 | outDepth = inPs.depth; 31 | @end 32 | @property( hlms_shadowcaster_point ) 33 | float distanceToCamera = length( inPs.toCameraWS ); 34 | @property( !exponential_shadow_maps ) 35 | outDepth = (distanceToCamera - passBuf.depthRange.x) * passBuf.depthRange.y + inPs.constBias; 36 | @end @property( exponential_shadow_maps ) 37 | outDepth = (distanceToCamera - passBuf.depthRange.x) * passBuf.depthRange.y; 38 | @end 39 | @end 40 | @end 41 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/Any/ShadowCaster_piece_vs.any: -------------------------------------------------------------------------------- 1 | 2 | //#include "SyntaxHighlightingMisc.h" 3 | 4 | @property( hlms_shadowcaster ) 5 | @piece( DoShadowCasterVS ) 6 | @property( syntax == glsl ) 7 | float shadowConstantBias = uintBitsToFloat( instance.worldMaterialIdx[drawId].y ); 8 | @end 9 | @property( syntax == hlsl ) 10 | float shadowConstantBias = asfloat( worldMaterialIdx[input.drawId].y ); 11 | @end 12 | @property( syntax == metal ) 13 | float shadowConstantBias = as_type( worldMaterialIdx[drawId].y ); 14 | @end 15 | 16 | @property( !hlms_shadow_uses_depth_texture && !hlms_shadowcaster_point && !exponential_shadow_maps ) 17 | //Linear depth 18 | @property( hlms_shadowcaster_directional ) 19 | outVs.depth = outVs_Position.z + shadowConstantBias * passBuf.depthRange.y * passBuf.depthRange.y; 20 | @end @property( !hlms_shadowcaster_directional ) 21 | outVs.depth = (outVs_Position.z + shadowConstantBias * passBuf.depthRange.y) * passBuf.depthRange.y; 22 | @end 23 | @property( syntax == glsl )outVs.depth = (outVs.depth * 0.5) + 0.5;@end 24 | @end 25 | 26 | @property( hlms_shadowcaster_point ) 27 | outVs.toCameraWS = worldPos.xyz - passBuf.cameraPosWS.xyz; 28 | @property( !exponential_shadow_maps ) 29 | outVs.constBias = shadowConstantBias * passBuf.depthRange.y * passBuf.depthRange.y; 30 | @end 31 | @end 32 | 33 | @property( !exponential_shadow_maps ) 34 | //We can't make the depth buffer linear without Z out in the fragment shader; 35 | //however we can use a cheap approximation ("pseudo linear depth") 36 | //see http://www.yosoygames.com.ar/wp/2014/01/linear-depth-buffer-my-ass/ 37 | @property( hlms_shadowcaster_directional ) 38 | outVs_Position.z = outVs_Position.z + shadowConstantBias * passBuf.depthRange.y * passBuf.depthRange.y; 39 | @end @property( !hlms_shadowcaster_directional ) 40 | outVs_Position.z = (outVs_Position.z + shadowConstantBias * passBuf.depthRange.y) * passBuf.depthRange.y * outVs_Position.w; 41 | @end 42 | @end 43 | 44 | @property( exponential_shadow_maps && !hlms_shadowcaster_point ) 45 | //It's the same as (float4( worldPos.xyz, 1 ) * viewMatrix).z 46 | float linearZ = -(dot( worldPos.xyz, passBuf.viewZRow.xyz ) + passBuf.viewZRow.w); 47 | //linearZ += (shadowConstantBias * passBuf.depthRange.y); 48 | outVs.depth = (linearZ - passBuf.depthRange.x) * passBuf.depthRange.y; 49 | @end 50 | @end 51 | @end 52 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/GLSL/CrossPlatformSettings_piece_all.glsl: -------------------------------------------------------------------------------- 1 | @piece( SetCrossPlatformSettings ) 2 | @property( GL3+ >= 430 )#version 430 core 3 | @end @property( GL3+ < 430 ) 4 | #version 330 core 5 | @end 6 | 7 | @property( GL_ARB_shading_language_420pack ) 8 | #extension GL_ARB_shading_language_420pack: require 9 | #define layout_constbuffer(x) layout( std140, x ) 10 | @end 11 | @property( GL_ARB_texture_buffer_range ) 12 | #define bufferFetch texelFetch 13 | @end 14 | 15 | #define float2 vec2 16 | #define float3 vec3 17 | #define float4 vec4 18 | 19 | #define int2 ivec2 20 | #define int3 ivec3 21 | #define int4 ivec4 22 | 23 | #define uint2 uvec2 24 | #define uint3 uvec3 25 | #define uint4 uvec4 26 | 27 | #define float3x3 mat3 28 | #define float4x4 mat4 29 | 30 | #define mul( x, y ) ((x) * (y)) 31 | #define saturate(x) clamp( (x), 0.0, 1.0 ) 32 | #define lerp mix 33 | #define INLINE 34 | 35 | #define finalDrawId drawId 36 | 37 | #define outVs_Position gl_Position 38 | #define OGRE_SampleLevel( tex, sampler, uv, lod ) textureLod( tex, uv.xy, lod ) 39 | @end 40 | 41 | @property( !GL_ARB_texture_buffer_range || !GL_ARB_shading_language_420pack ) 42 | @piece( SetCompatibilityLayer ) 43 | @property( !GL_ARB_texture_buffer_range ) 44 | #define samplerBuffer sampler2D 45 | #define isamplerBuffer isampler2D 46 | #define usamplerBuffer usampler2D 47 | vec4 bufferFetch( in sampler2D sampl, in int pixelIdx ) 48 | { 49 | ivec2 pos = ivec2( mod( pixelIdx, 2048 ), int( uint(pixelIdx) >> 11u ) ); 50 | return texelFetch( sampl, pos, 0 ); 51 | } 52 | ivec4 bufferFetch(in isampler2D sampl, in int pixelIdx) 53 | { 54 | ivec2 pos = ivec2( mod( pixelIdx, 2048 ), int( uint(pixelIdx) >> 11u ) ); 55 | return texelFetch( sampl, pos, 0 ); 56 | } 57 | uvec4 bufferFetch( in usampler2D sampl, in int pixelIdx ) 58 | { 59 | ivec2 pos = ivec2( mod( pixelIdx, 2048 ), int( uint(pixelIdx) >> 11u ) ); 60 | return texelFetch( sampl, pos, 0 ); 61 | } 62 | @end 63 | @property( !GL_ARB_shading_language_420pack ) 64 | #define layout_constbuffer(x) layout( std140 ) 65 | @end 66 | @end 67 | @end 68 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/GLSL/Matrix_piece_all.glsl: -------------------------------------------------------------------------------- 1 | @property( GL_ARB_texture_buffer_range ) 2 | @piece( Common_Matrix_DeclUnpackMatrix4x4 ) 3 | mat4 UNPACK_MAT4( samplerBuffer matrixBuf, uint pixelIdx ) 4 | { 5 | vec4 row0 = texelFetch( matrixBuf, int((pixelIdx) << 2u) ); 6 | vec4 row1 = texelFetch( matrixBuf, int(((pixelIdx) << 2u) + 1u) ); 7 | vec4 row2 = texelFetch( matrixBuf, int(((pixelIdx) << 2u) + 2u) ); 8 | vec4 row3 = texelFetch( matrixBuf, int(((pixelIdx) << 2u) + 3u) ); 9 | return mat4( row0, row1, row2, row3 ); 10 | } 11 | @end 12 | 13 | @piece( Common_Matrix_DeclUnpackMatrix3x4 ) 14 | mat3x4 UNPACK_MAT3x4( samplerBuffer matrixBuf, uint pixelIdx ) 15 | { 16 | vec4 row0 = texelFetch( matrixBuf, int((pixelIdx) << 2u) ); 17 | vec4 row1 = texelFetch( matrixBuf, int(((pixelIdx) << 2u) + 1u) ); 18 | vec4 row2 = texelFetch( matrixBuf, int(((pixelIdx) << 2u) + 2u) ); 19 | return mat3x4( row0, row1, row2 ); 20 | } 21 | @end 22 | @end 23 | 24 | @property( !GL_ARB_texture_buffer_range ) 25 | @piece( Common_Matrix_DeclUnpackMatrix4x4 ) 26 | mat4 UNPACK_MAT4( in sampler2D matrixBuf, in uint pixelIdx ) 27 | { 28 | ivec2 pos0 = ivec2(int(((pixelIdx) << 2u) & 2047u), int(((pixelIdx) << 2u) >> 11u)); 29 | ivec2 pos1 = ivec2(int((((pixelIdx) << 2u) + 1u) & 2047u), int((((pixelIdx) << 2u) + 1u) >> 11u)); 30 | ivec2 pos2 = ivec2(int((((pixelIdx) << 2u) + 2u) & 2047u), int((((pixelIdx) << 2u) + 2u) >> 11u)); 31 | ivec2 pos3 = ivec2(int((((pixelIdx) << 2u) + 3u) & 2047u), int((((pixelIdx) << 2u) + 3u) >> 11u)); 32 | vec4 row0 = texelFetch( matrixBuf, pos0, 0 ); 33 | vec4 row1 = texelFetch( matrixBuf, pos1, 0 ); 34 | vec4 row2 = texelFetch( matrixBuf, pos2, 0 ); 35 | vec4 row3 = texelFetch( matrixBuf, pos3, 0 ); 36 | return mat4( row0, row1, row2, row3 ); 37 | } 38 | @end 39 | 40 | @piece( Common_Matrix_DeclUnpackMatrix3x4 ) 41 | mat3x4 UNPACK_MAT3x4( in sampler2D matrixBuf, in uint pixelIdx ) 42 | { 43 | ivec2 pos0 = ivec2(int(((pixelIdx) << 2u) & 2047u), int(((pixelIdx) << 2u) >> 11u)); 44 | ivec2 pos1 = ivec2(int((((pixelIdx) << 2u) + 1u) & 2047u), int((((pixelIdx) << 2u) + 1u) >> 11u)); 45 | ivec2 pos2 = ivec2(int((((pixelIdx) << 2u) + 2u) & 2047u), int((((pixelIdx) << 2u) + 2u) >> 11u)); 46 | vec4 row0 = texelFetch( matrixBuf, pos0, 0 ); 47 | vec4 row1 = texelFetch( matrixBuf, pos1, 0 ); 48 | vec4 row2 = texelFetch( matrixBuf, pos2, 0 ); 49 | return mat3x4( row0, row1, row2 ); 50 | } 51 | @end 52 | @end 53 | 54 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/GLSL/QuaternionCode_piece_all.glsl: -------------------------------------------------------------------------------- 1 | @piece( DeclQuat_xAxis ) 2 | vec3 xAxis( vec4 qQuat ) 3 | { 4 | float fTy = 2.0 * qQuat.y; 5 | float fTz = 2.0 * qQuat.z; 6 | float fTwy = fTy * qQuat.w; 7 | float fTwz = fTz * qQuat.w; 8 | float fTxy = fTy * qQuat.x; 9 | float fTxz = fTz * qQuat.x; 10 | float fTyy = fTy * qQuat.y; 11 | float fTzz = fTz * qQuat.z; 12 | 13 | return vec3( 1.0-(fTyy+fTzz), fTxy+fTwz, fTxz-fTwy ); 14 | } 15 | @end 16 | 17 | @piece( DeclQuat_yAxis ) 18 | vec3 yAxis( vec4 qQuat ) 19 | { 20 | float fTx = 2.0 * qQuat.x; 21 | float fTy = 2.0 * qQuat.y; 22 | float fTz = 2.0 * qQuat.z; 23 | float fTwx = fTx * qQuat.w; 24 | float fTwz = fTz * qQuat.w; 25 | float fTxx = fTx * qQuat.x; 26 | float fTxy = fTy * qQuat.x; 27 | float fTyz = fTz * qQuat.y; 28 | float fTzz = fTz * qQuat.z; 29 | 30 | return vec3( fTxy-fTwz, 1.0-(fTxx+fTzz), fTyz+fTwx ); 31 | } 32 | @end 33 | 34 | @piece( DeclQuat_zAxis ) 35 | vec3 zAxis( vec4 qQuat ) 36 | { 37 | float fTx = 2.0 * qQuat.x; 38 | float fTy = 2.0 * qQuat.y; 39 | float fTz = 2.0 * qQuat.z; 40 | float fTwx = fTx * qQuat.w; 41 | float fTwy = fTy * qQuat.w; 42 | float fTxx = fTx * qQuat.x; 43 | float fTxz = fTz * qQuat.x; 44 | float fTyy = fTy * qQuat.y; 45 | float fTyz = fTz * qQuat.y; 46 | 47 | return vec3( fTxz+fTwy, fTyz-fTwx, 1.0-(fTxx+fTyy) ); 48 | } 49 | @end 50 | 51 | @piece( DeclQuat_AllAxis ) 52 | @insertpiece( DeclQuat_xAxis ) 53 | @insertpiece( DeclQuat_yAxis ) 54 | @insertpiece( DeclQuat_zAxis ) 55 | @end 56 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/GLSL/RenderDepthOnly_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | @property( hlms_render_depth_only && !alpha_test && !hlms_shadows_esm && !macOS) 2 | @set( hlms_disable_stage, 1 ) 3 | @end 4 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/HLSL/CrossPlatformSettings_piece_all.hlsl: -------------------------------------------------------------------------------- 1 | @piece( SetCrossPlatformSettings ) 2 | #define INLINE 3 | 4 | #define finalDrawId input.drawId 5 | 6 | #define outVs_Position outVs.gl_Position 7 | #define OGRE_SampleLevel( tex, sampler, uv, lod ) tex.SampleLevel( sampler, uv.xy, lod ) 8 | @end 9 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/HLSL/Matrix_piece_all.hlsl: -------------------------------------------------------------------------------- 1 | @piece( Common_Matrix_DeclUnpackMatrix4x4 ) 2 | float4x4 UNPACK_MAT4( Buffer matrixBuf, uint pixelIdx ) 3 | { 4 | float4 row1 = matrixBuf.Load( int((pixelIdx) << 2u) ); 5 | float4 row2 = matrixBuf.Load( int(((pixelIdx) << 2u) + 1u) ); 6 | float4 row3 = matrixBuf.Load( int(((pixelIdx) << 2u) + 2u) ); 7 | float4 row4 = matrixBuf.Load( int(((pixelIdx) << 2u) + 3u) ); 8 | 9 | return transpose( float4x4( row1, row2, row3, row4 ) ); 10 | } 11 | @end 12 | 13 | @piece( Common_Matrix_DeclUnpackMatrix4x3 ) 14 | float4x3 UNPACK_MAT4x3( Buffer matrixBuf, uint pixelIdx ) 15 | { 16 | float4 row1 = matrixBuf.Load( int((pixelIdx) << 2u) ); 17 | float4 row2 = matrixBuf.Load( int(((pixelIdx) << 2u) + 1u) ); 18 | float4 row3 = matrixBuf.Load( int(((pixelIdx) << 2u) + 2u) ); 19 | 20 | return transpose( float3x4( row1, row2, row3 ) ); 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/HLSL/QuaternionCode_piece_all.hlsl: -------------------------------------------------------------------------------- 1 | @piece( DeclQuat_xAxis ) 2 | float3 xAxis( float4 qQuat ) 3 | { 4 | float fTy = 2.0 * qQuat.y; 5 | float fTz = 2.0 * qQuat.z; 6 | float fTwy = fTy * qQuat.w; 7 | float fTwz = fTz * qQuat.w; 8 | float fTxy = fTy * qQuat.x; 9 | float fTxz = fTz * qQuat.x; 10 | float fTyy = fTy * qQuat.y; 11 | float fTzz = fTz * qQuat.z; 12 | 13 | return float3( 1.0-(fTyy+fTzz), fTxy+fTwz, fTxz-fTwy ); 14 | } 15 | @end 16 | 17 | @piece( DeclQuat_yAxis ) 18 | float3 yAxis( float4 qQuat ) 19 | { 20 | float fTx = 2.0 * qQuat.x; 21 | float fTy = 2.0 * qQuat.y; 22 | float fTz = 2.0 * qQuat.z; 23 | float fTwx = fTx * qQuat.w; 24 | float fTwz = fTz * qQuat.w; 25 | float fTxx = fTx * qQuat.x; 26 | float fTxy = fTy * qQuat.x; 27 | float fTyz = fTz * qQuat.y; 28 | float fTzz = fTz * qQuat.z; 29 | 30 | return float3( fTxy-fTwz, 1.0-(fTxx+fTzz), fTyz+fTwx ); 31 | } 32 | @end 33 | 34 | @piece( DeclQuat_zAxis ) 35 | float3 zAxis( float4 qQuat ) 36 | { 37 | float fTx = 2.0 * qQuat.x; 38 | float fTy = 2.0 * qQuat.y; 39 | float fTz = 2.0 * qQuat.z; 40 | float fTwx = fTx * qQuat.w; 41 | float fTwy = fTy * qQuat.w; 42 | float fTxx = fTx * qQuat.x; 43 | float fTxz = fTz * qQuat.x; 44 | float fTyy = fTy * qQuat.y; 45 | float fTyz = fTz * qQuat.y; 46 | 47 | return float3( fTxz+fTwy, fTyz-fTwx, 1.0-(fTxx+fTyy) ); 48 | } 49 | @end 50 | 51 | @piece( DeclQuat_AllAxis ) 52 | @insertpiece( DeclQuat_xAxis ) 53 | @insertpiece( DeclQuat_yAxis ) 54 | @insertpiece( DeclQuat_zAxis ) 55 | @end 56 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/HLSL/RenderDepthOnly_piece_ps.hlsl: -------------------------------------------------------------------------------- 1 | 2 | @property( !hlms_render_depth_only || (hlms_shadowcaster && (exponential_shadow_maps || hlms_shadowcaster_point)) ) 3 | @piece( output_type )PS_OUTPUT@end 4 | @end @property( !(!hlms_render_depth_only || (hlms_shadowcaster && (exponential_shadow_maps || hlms_shadowcaster_point))) ) 5 | @piece( output_type )void@end 6 | @end 7 | 8 | @property( hlms_render_depth_only && !alpha_test && !hlms_shadows_esm ) 9 | @set( hlms_disable_stage, 1 ) 10 | @end 11 | 12 | @piece( DeclOutputType ) 13 | struct PS_OUTPUT 14 | { 15 | @property( !hlms_shadowcaster ) 16 | float4 colour0 : SV_Target0; 17 | @end @property( hlms_shadowcaster ) 18 | @property( !hlms_render_depth_only ) 19 | float colour0 : SV_Target0; 20 | @end 21 | @property( hlms_render_depth_only ) 22 | float colour0 : SV_Depth; 23 | @end 24 | @end 25 | }; 26 | @end 27 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/Metal/CrossPlatformSettings_piece_all.metal: -------------------------------------------------------------------------------- 1 | @piece( SetCrossPlatformSettings ) 2 | #include 3 | using namespace metal; 4 | 5 | struct float1 6 | { 7 | float x; 8 | float1() {} 9 | float1( float _x ) : x( _x ) {} 10 | }; 11 | 12 | #define mul( x, y ) ((x) * (y)) 13 | #define lerp mix 14 | #define INLINE inline 15 | 16 | #define finalDrawId drawId 17 | 18 | #define outVs_Position outVs.gl_Position 19 | #define OGRE_SampleLevel( tex, sampler, uv, lod ) tex.sample( sampler, float2( uv ), level( lod ) ) 20 | @end 21 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/Metal/Matrix_piece_all.metal: -------------------------------------------------------------------------------- 1 | @piece( Common_Matrix_DeclUnpackMatrix4x4 ) 2 | inline float4x4 UNPACK_MAT4( device const float4 *matrixBuf, uint pixelIdx ) 3 | { 4 | float4 row0 = matrixBuf[(pixelIdx << 2u)]; 5 | float4 row1 = matrixBuf[(pixelIdx << 2u) + 1u]; 6 | float4 row2 = matrixBuf[(pixelIdx << 2u) + 2u]; 7 | float4 row3 = matrixBuf[(pixelIdx << 2u) + 3u]; 8 | return float4x4( row0, row1, row2, row3 ); 9 | } 10 | @end 11 | 12 | @piece( Common_Matrix_DeclUnpackMatrix3x4 ) 13 | inline float3x4 UNPACK_MAT3x4( device const float4 *matrixBuf, uint pixelIdx ) 14 | { 15 | float4 row0 = matrixBuf[(pixelIdx << 2u)]; 16 | float4 row1 = matrixBuf[(pixelIdx << 2u) + 1u]; 17 | float4 row2 = matrixBuf[(pixelIdx << 2u) + 2u]; 18 | return float3x4( row0, row1, row2 ); 19 | } 20 | @end 21 | 22 | @piece( Common_Matrix_Conversions ) 23 | inline float3x3 toMat3x3( float4x4 m ) 24 | { 25 | return float3x3( m[0].xyz, m[1].xyz, m[2].xyz ); 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/Metal/QuaternionCode_piece_all.metal: -------------------------------------------------------------------------------- 1 | @piece( DeclQuat_xAxis ) 2 | inline float3 xAxis( float4 qQuat ) 3 | { 4 | float fTy = 2.0 * qQuat.y; 5 | float fTz = 2.0 * qQuat.z; 6 | float fTwy = fTy * qQuat.w; 7 | float fTwz = fTz * qQuat.w; 8 | float fTxy = fTy * qQuat.x; 9 | float fTxz = fTz * qQuat.x; 10 | float fTyy = fTy * qQuat.y; 11 | float fTzz = fTz * qQuat.z; 12 | 13 | return float3( 1.0-(fTyy+fTzz), fTxy+fTwz, fTxz-fTwy ); 14 | } 15 | @end 16 | 17 | @piece( DeclQuat_yAxis ) 18 | inline float3 yAxis( float4 qQuat ) 19 | { 20 | float fTx = 2.0 * qQuat.x; 21 | float fTy = 2.0 * qQuat.y; 22 | float fTz = 2.0 * qQuat.z; 23 | float fTwx = fTx * qQuat.w; 24 | float fTwz = fTz * qQuat.w; 25 | float fTxx = fTx * qQuat.x; 26 | float fTxy = fTy * qQuat.x; 27 | float fTyz = fTz * qQuat.y; 28 | float fTzz = fTz * qQuat.z; 29 | 30 | return float3( fTxy-fTwz, 1.0-(fTxx+fTzz), fTyz+fTwx ); 31 | } 32 | @end 33 | 34 | @piece( DeclQuat_zAxis ) 35 | inline float3 zAxis( float4 qQuat ) 36 | { 37 | float fTx = 2.0 * qQuat.x; 38 | float fTy = 2.0 * qQuat.y; 39 | float fTz = 2.0 * qQuat.z; 40 | float fTwx = fTx * qQuat.w; 41 | float fTwy = fTy * qQuat.w; 42 | float fTxx = fTx * qQuat.x; 43 | float fTxz = fTz * qQuat.x; 44 | float fTyy = fTy * qQuat.y; 45 | float fTyz = fTz * qQuat.y; 46 | 47 | return float3( fTxz+fTwy, fTyz-fTwx, 1.0-(fTxx+fTyy) ); 48 | } 49 | @end 50 | 51 | @piece( DeclQuat_AllAxis ) 52 | @insertpiece( DeclQuat_xAxis ) 53 | @insertpiece( DeclQuat_yAxis ) 54 | @insertpiece( DeclQuat_zAxis ) 55 | @end 56 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Common/Metal/RenderDepthOnly_piece_ps.metal: -------------------------------------------------------------------------------- 1 | 2 | @property( !hlms_render_depth_only || (hlms_shadowcaster && (exponential_shadow_maps || hlms_shadowcaster_point)) ) 3 | @piece( output_type )PS_OUTPUT@end 4 | @end @property( !(!hlms_render_depth_only || (hlms_shadowcaster && (exponential_shadow_maps || hlms_shadowcaster_point))) ) 5 | @piece( output_type )void@end 6 | @end 7 | 8 | @property( hlms_render_depth_only && !alpha_test && !hlms_shadows_esm ) 9 | @set( hlms_disable_stage, 1 ) 10 | @end 11 | 12 | @piece( DeclOutputType ) 13 | struct PS_OUTPUT 14 | { 15 | @property( !hlms_shadowcaster ) 16 | float4 colour0 [[ color(0) ]]; 17 | @end @property( hlms_shadowcaster ) 18 | @property( !hlms_render_depth_only ) 19 | float colour0 [[ color(0) ]]; 20 | @end 21 | @property( hlms_render_depth_only ) 22 | float colour0 [[ depth(any) ]]; 23 | @end 24 | @end 25 | }; 26 | @end 27 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Pbs/Any/PlanarReflections_piece_all.any: -------------------------------------------------------------------------------- 1 | 2 | //#include "SyntaxHighlightingMisc.h" 3 | 4 | @property( !has_planar_reflections ) 5 | @set( use_planar_reflections, 0 ) 6 | @end 7 | 8 | @property( has_planar_reflections ) 9 | 10 | @piece( DeclPlanarReflUniforms ) 11 | float4 planarReflections[@value(has_planar_reflections)]; 12 | float4x4 planarReflProjectionMat; 13 | float4 invMaxDistanceToPlanarRefl; 14 | @end 15 | 16 | @end ///has_planar_reflections 17 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Pbs/Any/ShadowMapping_piece_vs.any: -------------------------------------------------------------------------------- 1 | 2 | //#include "SyntaxHighlightingMisc.h" 3 | 4 | @property( !hlms_shadowcaster ) 5 | @property( !exponential_shadow_maps ) 6 | @piece( DoShadowReceiveVS ) 7 | @foreach( hlms_num_shadow_map_lights, n ) 8 | @property( !hlms_shadowmap@n_is_point_light ) 9 | outVs.posL@n = mul( float4(worldPos.xyz, 1.0f), passBuf.shadowRcv[@n].texViewProj );@end @end 10 | 11 | @foreach( hlms_num_shadow_map_lights, n ) 12 | @property( !hlms_shadowmap@n_is_point_light ) 13 | @property( !hlms_shadowmap@n_is_directional_light ) 14 | outVs.posL@n.z = outVs.posL@n.z * passBuf.shadowRcv[@n].shadowDepthRange.y; 15 | @end 16 | @property( syntax == glsl )outVs.posL@n.z = (outVs.posL@n.z * 0.5) + 0.5;@end 17 | @end 18 | @end 19 | 20 | @property( hlms_pssm_splits )outVs.depth = outVs_Position.z;@end 21 | @end 22 | @end 23 | @property( exponential_shadow_maps ) 24 | @piece( DoShadowReceiveVS ) 25 | @foreach( hlms_num_shadow_map_lights, n ) 26 | @property( !hlms_shadowmap@n_is_point_light ) 27 | outVs.posL@n = mul( float4(worldPos.xyz, 1.0f), passBuf.shadowRcv[@n].texViewProj );@end @end 28 | 29 | @foreach( hlms_num_shadow_map_lights, n ) 30 | @property( !hlms_shadowmap@n_is_point_light ) 31 | //It's the same as (float4( worldPos.xyz, 1 ) * texViewMatrix).z 32 | outVs.posL@n.z = -(dot( worldPos.xyz, passBuf.shadowRcv[@n].texViewZRow.xyz ) + passBuf.shadowRcv[@n].texViewZRow.w); 33 | outVs.posL@n.z = (outVs.posL@n.z - passBuf.shadowRcv[@n].shadowDepthRange.x) 34 | * passBuf.shadowRcv[@n].shadowDepthRange.y; 35 | @end 36 | @end 37 | 38 | @property( hlms_pssm_splits )outVs.depth = outVs_Position.z;@end 39 | @end 40 | @end 41 | @end 42 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Pbs/GLSL/DetailMaps_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | // detail_maps_diffuse & detail_maps_normal are either 0 or 4 2 | 3 | @pmax( NumDetailMaps, detail_maps_diffuse, detail_maps_normal ) 4 | @foreach( NumDetailMaps, n ) 5 | @property( detail_offsets@n ) 6 | @piece( offsetDetail@n ) * material.detailOffsetScale[@value(currOffsetDetail)].zw + material.detailOffsetScale[@counter(currOffsetDetail)].xy@end 7 | @end 8 | @end 9 | 10 | @piece( detail_swizzle0 )x@end; 11 | @piece( detail_swizzle1 )y@end; 12 | @piece( detail_swizzle2 )z@end; 13 | @piece( detail_swizzle3 )w@end; 14 | 15 | /* 16 | Down below we perform: 17 | if( detail_maps_normal ) 18 | second_valid_detail_map_nm = first_valid_detail_map_nm + 1; 19 | else 20 | second_valid_detail_map_nm = 0; 21 | */ 22 | @property( detail_maps_normal ) 23 | @add( second_valid_detail_map_nm, first_valid_detail_map_nm, 1 ) 24 | @end @property( !detail_maps_normal ) 25 | @set( second_valid_detail_map_nm, 0 ) 26 | @end 27 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Pbs/HLSL/DetailMaps_piece_ps.hlsl: -------------------------------------------------------------------------------- 1 | // detail_maps_diffuse & detail_maps_normal are either 0 or 4 2 | 3 | @pmax( NumDetailMaps, detail_maps_diffuse, detail_maps_normal ) 4 | @foreach( NumDetailMaps, n ) 5 | @property( detail_offsets@n ) 6 | @piece( offsetDetail@n ) * material.detailOffsetScale[@value(currOffsetDetail)].zw + material.detailOffsetScale[@counter(currOffsetDetail)].xy@end 7 | @end 8 | @end 9 | 10 | @piece( detail_swizzle0 )x@end; 11 | @piece( detail_swizzle1 )y@end; 12 | @piece( detail_swizzle2 )z@end; 13 | @piece( detail_swizzle3 )w@end; 14 | 15 | /* 16 | Down below we perform: 17 | if( detail_maps_normal ) 18 | second_valid_detail_map_nm = first_valid_detail_map_nm + 1; 19 | else 20 | second_valid_detail_map_nm = 0; 21 | */ 22 | @property( detail_maps_normal ) 23 | @add( second_valid_detail_map_nm, first_valid_detail_map_nm, 1 ) 24 | @end @property( !detail_maps_normal ) 25 | @set( second_valid_detail_map_nm, 0 ) 26 | @end 27 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Pbs/Metal/DetailMaps_piece_ps.metal: -------------------------------------------------------------------------------- 1 | // detail_maps_diffuse & detail_maps_normal are either 0 or 4 2 | 3 | @pmax( NumDetailMaps, detail_maps_diffuse, detail_maps_normal ) 4 | @foreach( NumDetailMaps, n ) 5 | @property( detail_offsets@n ) 6 | @piece( offsetDetail@n ) * material.detailOffsetScale[@value(currOffsetDetail)].zw + material.detailOffsetScale[@counter(currOffsetDetail)].xy@end 7 | @end 8 | @end 9 | 10 | @piece( detail_swizzle0 )x@end; 11 | @piece( detail_swizzle1 )y@end; 12 | @piece( detail_swizzle2 )z@end; 13 | @piece( detail_swizzle3 )w@end; 14 | 15 | /* 16 | Down below we perform: 17 | if( detail_maps_normal ) 18 | second_valid_detail_map_nm = first_valid_detail_map_nm + 1; 19 | else 20 | second_valid_detail_map_nm = 0; 21 | */ 22 | @property( detail_maps_normal ) 23 | @add( second_valid_detail_map_nm, first_valid_detail_map_nm, 1 ) 24 | @end @property( !detail_maps_normal ) 25 | @set( second_valid_detail_map_nm, 0 ) 26 | @end 27 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/PbsMobile/GLSL/BlendModes_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | @piece( NormalNonPremul ) 2 | //Normal Non Premultiplied @value(t) 3 | diffuseCol.xyz = mix( diffuseCol.xyz, detailCol@value(t).xyz, detailCol@value(t).a );@add( t, 1 ) 4 | @end 5 | 6 | @piece( NormalPremul ) 7 | //Normal Premultiplied @value(t) 8 | diffuseCol.xyz = (1.0 - detailCol@value(t).a) * diffuseCol.xyz + detailCol@value(t).xyz;@add( t, 1 ) 9 | @end 10 | 11 | @piece( Add ) 12 | //Add @value(t) 13 | diffuseCol.xyz = mix( diffuseCol.xyz, 14 | min( diffuseCol.xyz + detailCol@value(t).xyz, vec3(1.0) ), 15 | detailCol@value(t).a );@add( t, 1 ) 16 | @end 17 | 18 | @piece( Subtract ) 19 | //Subtract @value(t) 20 | diffuseCol.xyz = mix( diffuseCol.xyz, 21 | max( diffuseCol.xyz - detailCol@value(t).xyz, vec3(0.0) ), 22 | detailCol@value(t).a );@add( t, 1 ) 23 | @end 24 | 25 | @piece( Multiply ) 26 | //Multiply @value(t) 27 | diffuseCol.xyz = mix( diffuseCol.xyz, 28 | diffuseCol.xyz * detailCol@value(t).xyz, 29 | detailCol@value(t).a );@add( t, 1 ) 30 | @end 31 | 32 | @piece( Multiply2x ) 33 | //Multiply2x @value(t) 34 | diffuseCol.xyz = mix( diffuseCol.xyz, 35 | min( diffuseCol.xyz * detailCol@value(t).xyz * 2.0, vec3(1.0) ), 36 | detailCol@value(t).a );@add( t, 1 ) 37 | @end 38 | 39 | @piece( Screen ) 40 | //Screen @value(t) 41 | diffuseCol.xyz = mix( diffuseCol.xyz, 42 | 1.0 - (1.0 - diffuseCol.xyz) * (1.0 - detailCol@value(t).xyz), 43 | detailCol@value(t).a );@add( t, 1 ) 44 | @end 45 | 46 | @piece( Overlay ) 47 | //Overlay @value(t) 48 | diffuseCol.xyz = mix( diffuseCol.xyz, 49 | diffuseCol.xyz * ( diffuseCol.xyz + 2.0 * detailCol@value(t).xyz * (1.0 - diffuseCol.xyz) ), 50 | detailCol@value(t).a );@add( t, 1 ) 51 | @end 52 | 53 | @piece( Lighten ) 54 | //Lighten @value(t) 55 | diffuseCol.xyz = mix( diffuseCol.xyz, 56 | max( diffuseCol.xyz, detailCol@value(t).xyz ), 57 | detailCol@value(t).a );@add( t, 1 ) 58 | @end 59 | 60 | @piece( Darken ) 61 | //Darken @value(t) 62 | diffuseCol.xyz = mix( diffuseCol.xyz, 63 | min( diffuseCol.xyz, detailCol@value(t).xyz ), 64 | detailCol@value(t).a );@add( t, 1 ) 65 | @end 66 | 67 | @piece( GrainExtract ) 68 | //GrainExtract @value(t) 69 | diffuseCol.xyz = mix( diffuseCol.xyz, 70 | (diffuseCol.xyz - detailCol@value(t).xyz) + 0.5f, 71 | detailCol@value(t).a );@add( t, 1 ) 72 | @end 73 | 74 | @piece( GrainMerge ) 75 | //GrainMerge @value(t) 76 | diffuseCol.xyz = mix( diffuseCol.xyz, 77 | (diffuseCol.xyz + detailCol@value(t).xyz) - 0.5f, 78 | detailCol@value(t).a );@add( t, 1 ) 79 | @end 80 | 81 | @piece( Difference ) 82 | //Difference @value(t) 83 | diffuseCol.xyz = mix( diffuseCol.xyz, 84 | abs(diffuseCol.xyz - detailCol@value(t).xyz), 85 | detailCol@value(t).a );@add( t, 1 ) 86 | @end 87 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Terra/GLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | @property( !hlms_shadowcaster && terra_enabled ) 2 | 3 | @piece( custom_VStoPS ) 4 | float terrainShadow; 5 | @end 6 | 7 | /// Extra per-pass global data we need for applying our 8 | /// shadows to regular objects, passed to all PBS shaders. 9 | @piece( custom_passBuffer ) 10 | vec4 terraOrigin; //Normalized. i.e. -terrainOrigin / terrainDimensions 11 | //.xz = terrain 1.0 / XZ dimensions. 12 | //.y = 1.0 / terrainHeight; 13 | vec4 invTerraBounds; 14 | @end 15 | 16 | /// Add the shadows' texture to the vertex shader 17 | @piece( custom_vs_uniformDeclaration ) 18 | uniform sampler2D terrainShadows; 19 | @end 20 | 21 | /// Evaluate the shadow based on world XZ position & height in the vertex shader. 22 | /// Doing it at the pixel shader level would be more accurate, but the difference 23 | /// is barely noticeable, and slower 24 | @piece( custom_vs_posExecution ) 25 | vec3 terraShadowData = textureLod( terrainShadows, worldPos.xz * passBuf.invTerraBounds.xz + passBuf.terraOrigin.xz, 0 ).xyz; 26 | float terraHeightWeight = worldPos.y * passBuf.invTerraBounds.y + passBuf.terraOrigin.y; 27 | terraHeightWeight = (terraHeightWeight - terraShadowData.y) * terraShadowData.z * 1023.0; 28 | outVs.terrainShadow = mix( terraShadowData.x, 1.0, clamp( terraHeightWeight, 0.0, 1.0 ) ); 29 | @end 30 | 31 | @property( hlms_num_shadow_map_lights ) 32 | @piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end 33 | @end @property( !hlms_num_shadow_map_lights ) 34 | @piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end 35 | @piece( DarkenWithShadowFirstLight )* fShadow@end 36 | @end 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Terra/GLSL/Structs_piece_vs_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | 2 | @piece( TerraMaterialDecl ) 3 | layout_constbuffer(binding = 1) uniform MaterialBuf 4 | { 5 | /* kD is already divided by PI to make it energy conserving. 6 | (formula is finalDiffuse = NdotL * surfaceDiffuse / PI) 7 | */ 8 | vec4 kD; //kD.w is padding 9 | vec4 roughness; 10 | vec4 metalness; 11 | vec4 detailOffsetScale[4]; 12 | 13 | @insertpiece( custom_materialBuffer ) 14 | } material; 15 | @end 16 | 17 | @piece( TerraInstanceDecl ) 18 | struct CellData 19 | { 20 | //.x = numVertsPerLine 21 | //.y = lodLevel 22 | //.z = vao->getPrimitiveCount() / m_verticesPerLine - 2u 23 | //.w = skirtY (float) 24 | uvec4 numVertsPerLine; 25 | ivec4 xzTexPosBounds; //XZXZ 26 | vec4 pos; //.w contains 1.0 / xzTexPosBounds.z 27 | vec4 scale; //.w contains 1.0 / xzTexPosBounds.w 28 | }; 29 | 30 | layout_constbuffer(binding = 2) uniform InstanceBuffer 31 | { 32 | CellData cellData[256]; 33 | } instance; 34 | @end 35 | 36 | @piece( Terra_VStoPS_block ) 37 | //flat uint drawId; 38 | vec3 pos; 39 | vec2 uv0; 40 | 41 | @foreach( hlms_num_shadow_map_lights, n ) 42 | @property( !hlms_shadowmap@n_is_point_light ) 43 | vec4 posL@n;@end @end 44 | @property( hlms_pssm_splits )float depth;@end 45 | @insertpiece( custom_VStoPS ) 46 | @end 47 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Terra/GLSL/Textures_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | 2 | @undefpiece( kD ) 3 | @piece( kD )diffuseCol@end 4 | 5 | @undefpiece( kS ) 6 | @piece( kS )vec3( 1, 1, 1 )@end 7 | 8 | @foreach( detail_maps_normal, n ) 9 | @undefpiece( SampleDetailMapNm@n ) 10 | @piece( SampleDetailMapNm@n )getTSDetailNormal( textureMaps[@value(detail_map_nm@n_idx)], vec3( inPs.uv0.xy * material.detailOffsetScale[@n].zw + 11 | material.detailOffsetScale[@n].xy , @value(detail_map_nm@n_idx_slice) ) )@end 12 | @end 13 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Terra/HLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.hlsl: -------------------------------------------------------------------------------- 1 | @property( !hlms_shadowcaster && terra_enabled ) 2 | 3 | @piece( custom_VStoPS ) 4 | float terrainShadow : TEXCOORD@counter(texcoord); 5 | @end 6 | 7 | /// Extra per-pass global data we need for applying our 8 | /// shadows to regular objects, passed to all PBS shaders. 9 | @piece( custom_passBuffer ) 10 | float4 terraOrigin; //Normalized. i.e. -terrainOrigin / terrainDimensions 11 | //.xz = terrain 1.0 / XZ dimensions. 12 | //.y = 1.0 / terrainHeight; 13 | float4 invTerraBounds; 14 | @end 15 | 16 | /// Add the shadows' texture to the vertex shader 17 | @piece( custom_vs_uniformDeclaration ) 18 | SamplerState terrainShadowSampler : register(s12); 19 | Texture2D terrainShadows : register(t12); 20 | @end 21 | 22 | /// Evaluate the shadow based on world XZ position & height in the vertex shader. 23 | /// Doing it at the pixel shader level would be more accurate, but the difference 24 | /// is barely noticeable, and slower 25 | @piece( custom_vs_posExecution ) 26 | float3 terraShadowData = terrainShadows.SampleLevel( terrainShadowSampler, worldPos.xz * passBuf.invTerraBounds.xz + passBuf.terraOrigin.xz, 0 ).xyz; 27 | float terraHeightWeight = worldPos.y * passBuf.invTerraBounds.y + passBuf.terraOrigin.y; 28 | terraHeightWeight = (terraHeightWeight - terraShadowData.y) * terraShadowData.z * 1023.0; 29 | outVs.terrainShadow = lerp( terraShadowData.x, 1.0, saturate( terraHeightWeight ) ); 30 | @end 31 | 32 | @property( hlms_num_shadow_map_lights ) 33 | @piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end 34 | @end @property( !hlms_num_shadow_map_lights ) 35 | @piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end 36 | @piece( DarkenWithShadowFirstLight )* fShadow@end 37 | @end 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Terra/HLSL/Structs_piece_vs_piece_ps.hlsl: -------------------------------------------------------------------------------- 1 | @piece( TerraMaterialDecl ) 2 | //Uniforms that change per Item/Entity, but change very infrequently 3 | struct Material 4 | { 5 | /* kD is already divided by PI to make it energy conserving. 6 | (formula is finalDiffuse = NdotL * surfaceDiffuse / PI) 7 | */ 8 | float4 kD; //kD.w is padding 9 | float4 roughness; 10 | float4 metalness; 11 | float4 detailOffsetScale[4]; 12 | 13 | @insertpiece( custom_materialBuffer ) 14 | }; 15 | 16 | cbuffer MaterialBuf : register(b1) 17 | { 18 | Material material; 19 | }; 20 | @end 21 | 22 | 23 | @piece( TerraInstanceDecl ) 24 | struct CellData 25 | { 26 | //.x = numVertsPerLine 27 | //.y = lodLevel 28 | //.z = vao->getPrimitiveCount() / m_verticesPerLine - 2u 29 | //.w = skirtY (float) 30 | uint4 numVertsPerLine; 31 | int4 xzTexPosBounds; //XZXZ 32 | float4 pos; //.w contains 1.0 / xzTexPosBounds.z 33 | float4 scale; //.w contains 1.0 / xzTexPosBounds.w 34 | }; 35 | //Uniforms that change per Item/Entity 36 | cbuffer InstanceBuffer : register(b2) 37 | { 38 | CellData cellDataArray[256]; 39 | }; 40 | @end 41 | 42 | //Reset texcoord to 0 for every shader stage (since values are preserved). 43 | @pset( texcoord, 0 ) 44 | 45 | @piece( Terra_VStoPS_block ) 46 | float3 pos : TEXCOORD@counter(texcoord); 47 | float2 uv0 : TEXCOORD@counter(texcoord); 48 | @foreach( hlms_num_shadow_map_lights, n ) 49 | @property( !hlms_shadowmap@n_is_point_light ) 50 | float4 posL@n : TEXCOORD@counter(texcoord);@end @end 51 | 52 | @property( hlms_pssm_splits )float depth : TEXCOORD@counter(texcoord);@end 53 | @insertpiece( custom_VStoPS ) 54 | @end 55 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Terra/HLSL/Textures_piece_ps.hlsl: -------------------------------------------------------------------------------- 1 | 2 | @undefpiece( kD ) 3 | @piece( kD )diffuseCol@end 4 | 5 | @undefpiece( kS ) 6 | @piece( kS )float3( 1, 1, 1 )@end 7 | 8 | @add( textureRegStart, 2 ) 9 | @add( envMapReg, 2 ) 10 | @add( textureRegShadowMapStart, 2 ) 11 | @add( samplerStateStart, 2 ) 12 | 13 | @undefpiece( diffuseExtraParam ) 14 | @undefpiece( specularExtraParam ) 15 | @undefpiece( roughnessExtraParam ) 16 | @undefpiece( metallicExtraParam ) 17 | 18 | @undefpiece( diffuseExtraParamDef ) 19 | @undefpiece( specularExtraParamDef ) 20 | @undefpiece( roughnessExtraParamDef ) 21 | @undefpiece( metallicExtraParamDef ) 22 | 23 | @piece( diffuseExtraParamDef ), float3 diffuseCol@end 24 | @piece( diffuseExtraParam ), diffuseCol.xyz@end 25 | @piece( metallicExtraParamDef ), float3 F0@end 26 | @piece( metallicExtraParam ), F0@end 27 | @piece( roughnessExtraParamDef ), float ROUGHNESS@end 28 | @piece( roughnessExtraParam ), ROUGHNESS@end 29 | 30 | @foreach( detail_maps_normal, n ) 31 | @undefpiece( SampleDetailMapNm@n ) 32 | @piece( SampleDetailMapNm@n )getTSDetailNormal( samplerState@value(detail_map_nm@n_idx), 33 | textureMaps[@value(detail_map_nm@n_idx)], 34 | float3( inPs.uv0.xy * material.detailOffsetScale[@n].zw + 35 | material.detailOffsetScale[@n].xy, @value(detail_map_nm@n_idx_slice) ) )@end 36 | @end 37 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Unlit/Any/StructsUnlit_piece_all.any: -------------------------------------------------------------------------------- 1 | 2 | @piece( PassInternalDecl ) 3 | //Vertex shader 4 | float4x4 viewProj[2]; 5 | @property( hlms_global_clip_planes ) 6 | float4 clipPlane0; 7 | @end 8 | @property( hlms_global_clip_planes || exponential_shadow_maps || hlms_shadowcaster_point )float4x4 invViewProj;@end 9 | @property( hlms_shadowcaster ) 10 | @property( exponential_shadow_maps )float4 viewZRow;@end 11 | float4 depthRange; 12 | @property( hlms_shadowcaster_point ) 13 | float4 cameraPosWS; //Camera position in world space 14 | @end 15 | @end 16 | //Pixel Shader 17 | float4 invWindowSize; 18 | @insertpiece( custom_passBuffer ) 19 | @end 20 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Unlit/GLSL/Structs_piece_vs_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | @piece( PassDecl ) 2 | //Uniforms that change per pass 3 | layout_constbuffer(binding = 0) uniform PassBuffer 4 | { 5 | @insertpiece( PassInternalDecl ) 6 | } passBuf; 7 | @end 8 | 9 | @piece( MaterialDecl ) 10 | struct Material 11 | { 12 | vec4 alpha_test_threshold; 13 | vec4 diffuse; 14 | 15 | uvec4 indices0_3; 16 | uvec4 indices4_7; 17 | 18 | @insertpiece( custom_materialBuffer ) 19 | }; 20 | 21 | layout_constbuffer(binding = 1) uniform MaterialBuf 22 | { 23 | Material m[@value( materials_per_buffer )]; 24 | } materialArray; 25 | @end 26 | 27 | 28 | @piece( InstanceDecl ) 29 | //Uniforms that change per Item/Entity 30 | layout_constbuffer(binding = 2) uniform InstanceBuffer 31 | { 32 | //.x = 33 | //Contains the material's start index. 34 | // 35 | //.y = 36 | //shadowConstantBias. Send the bias directly to avoid an 37 | //unnecessary indirection during the shadow mapping pass. 38 | //Must be loaded with uintBitsToFloat 39 | // 40 | //.z = 41 | //Contains 0 or 1 to index into passBuf.viewProj[]. Only used 42 | //if hlms_identity_viewproj_dynamic is set. 43 | uvec4 worldMaterialIdx[4096]; 44 | } instance; 45 | @end 46 | 47 | @piece( VStoPS_block ) 48 | @property( !hlms_shadowcaster ) 49 | flat uint drawId; 50 | @property( hlms_colour )vec4 colour;@end 51 | @foreach( out_uv_half_count, n ) 52 | vec@value( out_uv_half_count@n ) uv@n;@end 53 | @end 54 | @property( hlms_shadowcaster ) 55 | @property( (!hlms_shadow_uses_depth_texture || exponential_shadow_maps) && !hlms_shadowcaster_point ) 56 | float depth; 57 | @end 58 | @property( hlms_shadowcaster_point ) 59 | vec3 toCameraWS; 60 | @property( !exponential_shadow_maps ) 61 | flat float constBias; 62 | @end 63 | @end 64 | @end 65 | @insertpiece( custom_VStoPS ) 66 | @end 67 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Unlit/HLSL/Structs_piece_vs_piece_ps.hlsl: -------------------------------------------------------------------------------- 1 | @piece( PassDecl ) 2 | //Uniforms that change per pass 3 | cbuffer PassBuffer : register(b0) 4 | { 5 | struct PassData 6 | { 7 | @insertpiece( PassInternalDecl ) 8 | } passBuf; 9 | }; 10 | @end 11 | 12 | @piece( MaterialDecl ) 13 | struct Material 14 | { 15 | float4 alpha_test_threshold; 16 | float4 diffuse; 17 | 18 | uint4 indices0_3; 19 | uint4 indices4_7; 20 | 21 | @insertpiece( custom_materialBuffer ) 22 | }; 23 | 24 | cbuffer materialArray : register(b1) 25 | { 26 | Material materialArray[@value( materials_per_buffer )]; 27 | }; 28 | @end 29 | 30 | 31 | @piece( InstanceDecl ) 32 | //Uniforms that change per Item/Entity 33 | cbuffer instance : register(b2) 34 | { 35 | //.x = 36 | //Contains the material's start index. 37 | // 38 | //.y = 39 | //shadowConstantBias. Send the bias directly to avoid an 40 | //unnecessary indirection during the shadow mapping pass. 41 | //Must be loaded with uintBitsToFloat 42 | // 43 | //.z = 44 | //Contains 0 or 1 to index into passBuf.viewProj[]. Only used 45 | //if hlms_identity_viewproj_dynamic is set. 46 | @property( fast_shader_build_hack ) 47 | uint4 worldMaterialIdx[2]; 48 | @end @property( !fast_shader_build_hack ) 49 | uint4 worldMaterialIdx[4096]; 50 | @end 51 | }; 52 | @end 53 | 54 | //Reset texcoord to 0 for every shader stage (since values are preserved). 55 | @pset( texcoord, 0 ) 56 | 57 | @piece( VStoPS_block ) 58 | @property( !hlms_shadowcaster ) 59 | nointerpolation uint drawId : TEXCOORD@counter(texcoord); 60 | @property( hlms_colour )float4 colour : TEXCOORD@counter(texcoord);@end 61 | @foreach( out_uv_half_count, n ) 62 | float@value( out_uv_half_count@n ) uv@n : TEXCOORD@counter(texcoord);@end 63 | @end 64 | @property( hlms_shadowcaster ) 65 | @property( (!hlms_shadow_uses_depth_texture || exponential_shadow_maps) && !hlms_shadowcaster_point ) 66 | float depth : TEXCOORD@counter(texcoord); 67 | @end 68 | @property( hlms_shadowcaster_point ) 69 | float3 toCameraWS : TEXCOORD@counter(texcoord); 70 | @property( !exponential_shadow_maps ) 71 | nointerpolation float constBias : TEXCOORD@counter(texcoord); 72 | @end 73 | @end 74 | @end 75 | @insertpiece( custom_VStoPS ) 76 | @end 77 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/Unlit/Metal/Structs_piece_vs_piece_ps.metal: -------------------------------------------------------------------------------- 1 | @piece( PassStructDecl ) 2 | //Uniforms that change per pass 3 | struct PassData 4 | { 5 | @insertpiece( PassInternalDecl ) 6 | };@end 7 | 8 | @piece( PassDecl ) 9 | , constant PassData &passBuf [[buffer(CONST_SLOT_START+0)]] 10 | @end 11 | 12 | @piece( MaterialStructDecl ) 13 | struct Material 14 | { 15 | float4 alpha_test_threshold; 16 | float4 diffuse; 17 | 18 | @foreach( 16, n ) 19 | ushort diffuseIdx@n;@end 20 | 21 | @insertpiece( custom_materialBuffer ) 22 | };@end 23 | 24 | @piece( MaterialDecl ) 25 | , constant Material *materialArray [[buffer(CONST_SLOT_START+1)]] 26 | @end 27 | 28 | 29 | @piece( InstanceDecl ) 30 | //Uniforms that change per Item/Entity 31 | //.x = 32 | //Contains the material's start index. 33 | // 34 | //.y = 35 | //shadowConstantBias. Send the bias directly to avoid an 36 | //unnecessary indirection during the shadow mapping pass. 37 | //Must be loaded with uintBitsToFloat 38 | // 39 | //.z = 40 | //Contains 0 or 1 to index into passBuf.viewProj[]. Only used 41 | //if hlms_identity_viewproj_dynamic is set. 42 | , constant uint4 *worldMaterialIdx [[buffer(CONST_SLOT_START+2)]] 43 | @end 44 | 45 | //Reset texcoord to 0 for every shader stage (since values are preserved). 46 | @pset( texcoord, 0 ) 47 | 48 | @piece( VStoPS_block ) 49 | @property( !hlms_shadowcaster ) 50 | ushort materialId [[flat]]; 51 | @property( hlms_colour )float4 colour;@end 52 | @foreach( out_uv_half_count, n ) 53 | float@value( out_uv_half_count@n ) uv@n;@end 54 | @end 55 | @property( hlms_shadowcaster ) 56 | @property( (!hlms_shadow_uses_depth_texture || exponential_shadow_maps) && !hlms_shadowcaster_point ) 57 | float depth; 58 | @end 59 | @property( hlms_shadowcaster_point ) 60 | float3 toCameraWS; 61 | @property( !exponential_shadow_maps ) 62 | float constBias [[flat]]; 63 | @end 64 | @end 65 | @end 66 | @insertpiece( custom_VStoPS ) 67 | @end 68 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/UnlitMobile/GLSL/BlendModes_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | @piece( NormalNonPremul ) 2 | //Normal Non Premultiplied @counter(t) 3 | outColour.xyz = mix( outColour.xyz, topImage@value(t).xyz, topImage@value(t).a ); 4 | @end 5 | 6 | @piece( NormalPremul ) 7 | //Normal Premultiplied @counter(t) 8 | outColour.xyz = (1.0 - topImage@value(t).a) * outColour.xyz + topImage@value(t).xyz; 9 | @end 10 | 11 | @piece( Add ) 12 | //Add @counter(t) 13 | outColour.xyz = mix( outColour.xyz, 14 | min( outColour.xyz + topImage@value(t).xyz, vec3(1.0) ), 15 | topImage@value(t).a ); 16 | @end 17 | 18 | @piece( Subtract ) 19 | //Subtract @counter(t) 20 | outColour.xyz = mix( outColour.xyz, 21 | max( outColour.xyz - topImage@value(t).xyz, vec3(0.0) ), 22 | topImage@value(t).a ); 23 | @end 24 | 25 | @piece( Multiply ) 26 | //Multiply @counter(t) 27 | outColour.xyz = mix( outColour.xyz, 28 | outColour.xyz * topImage@value(t).xyz, 29 | topImage@value(t).a ); 30 | @end 31 | 32 | @piece( Multiply2x ) 33 | //Multiply2x @counter(t) 34 | outColour.xyz = mix( outColour.xyz, 35 | min( outColour.xyz * topImage@value(t).xyz * 2.0, vec3(1.0) ), 36 | topImage@value(t).a ); 37 | @end 38 | 39 | @piece( Screen ) 40 | //Screen @counter(t) 41 | outColour.xyz = mix( outColour.xyz, 42 | 1.0 - (1.0 - outColour.xyz) * (1.0 - topImage@value(t).xyz), 43 | topImage@value(t).a ); 44 | @end 45 | 46 | @piece( Overlay ) 47 | //Overlay @counter(t) 48 | outColour.xyz = mix( outColour.xyz, 49 | outColour.xyz * ( outColour.xyz + 2.0 * topImage@value(t).xyz * (1.0 - outColour.xyz) ), 50 | topImage@value(t).a ); 51 | @end 52 | 53 | @piece( Lighten ) 54 | //Lighten @counter(t) 55 | outColour.xyz = mix( outColour.xyz, 56 | max( outColour.xyz, topImage@value(t).xyz ), 57 | topImage@value(t).a ); 58 | @end 59 | 60 | @piece( Darken ) 61 | //Darken @counter(t) 62 | outColour.xyz = mix( outColour.xyz, 63 | min( outColour.xyz, topImage@value(t).xyz ), 64 | topImage@value(t).a ); 65 | @end 66 | 67 | @piece( GrainExtract ) 68 | //GrainExtract @counter(t) 69 | outColour.xyz = mix( outColour.xyz, 70 | (outColour.xyz - topImage@value(t).xyz) + 0.5f, 71 | topImage@value(t).a ); 72 | @end 73 | 74 | @piece( GrainMerge ) 75 | //GrainMerge @counter(t) 76 | outColour.xyz = mix( outColour.xyz, 77 | (outColour.xyz + topImage@value(t).xyz) - 0.5f, 78 | topImage@value(t).a ); 79 | @end 80 | 81 | @piece( Difference ) 82 | //Difference @counter(t) 83 | outColour.xyz = mix( outColour.xyz, 84 | abs(outColour.xyz - topImage@value(t).xyz), 85 | topImage@value(t).a ); 86 | @end 87 | 88 | @foreach( 16, n ) 89 | @property( uv_atlas@n ) @piece( atlasOffset@n )* atlasOffsets[@n].z + atlasOffsets[@n].xy @end @end @end 90 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/UnlitMobile/GLSL/CrossPlatformSettings_piece_ps.glsl: -------------------------------------------------------------------------------- 1 | @piece( SetCrossPlatformSettings ) 2 | @property( GL3+ ) 3 | #version 330 4 | #define FRAG_COLOR 0 5 | layout(location = FRAG_COLOR, index = 0) out vec4 outColour; 6 | @piece( texture2D )texture@end 7 | @piece( textureCube )texture@end 8 | @piece( textureCubeLod )textureLod@end 9 | 10 | @piece( lowp )highp@end 11 | @piece( mediump )highp@end 12 | @end @property( !GL3+ ) 13 | #define in varying 14 | #define outColour gl_FragColor 15 | @property( hlms_high_quality ) 16 | @piece( lowp )highp@end 17 | @piece( mediump )highp@end 18 | precision highp float; 19 | @end @property( !hlms_high_quality ) 20 | @piece( lowp )lowp@end 21 | @piece( mediump )mediump@end 22 | precision mediump float; 23 | @end 24 | 25 | @piece( texture2D )texture2D@end 26 | @piece( textureCube )textureCube@end 27 | @piece( textureCubeLod )textureCube@end 28 | @end 29 | @end 30 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/UnlitMobile/GLSL/CrossPlatformSettings_piece_vs.glsl: -------------------------------------------------------------------------------- 1 | @piece( SetCrossPlatformSettings ) 2 | @property( GL3+ ) 3 | #version 330 4 | @end @property( !GL3+ ) 5 | #define in attribute 6 | #define out varying 7 | @end 8 | @end 9 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/UnlitMobile/GLSL/PixelShader_ps.glsl: -------------------------------------------------------------------------------- 1 | @insertpiece( SetCrossPlatformSettings ) 2 | 3 | @property( hlms_colour )in @insertpiece( lowp ) vec4 psColour;@end 4 | 5 | @foreach( hlms_uv_count, n ) 6 | in @insertpiece( mediump ) vec@value( hlms_uv_count@n ) psUv@n;@end 7 | 8 | // START UNIFORM DECLARATION 9 | //Uniforms that change per material 10 | @property( diffuse )uniform @insertpiece( mediump ) vec4 diffuseColour;@end 11 | @property( alpha_test )uniform @insertpiece( lowp ) float alpha_test_threshold;@end 12 | @property( uv_atlas )uniform @insertpiece( mediump ) vec3 atlasOffsets[@value( uv_atlas )];@end 13 | // END UNIFORM DECLARATION 14 | 15 | @property( diffuse_map )uniform @insertpiece( lowp ) sampler2D texDiffuseMap[@value( diffuse_map )];@end 16 | 17 | @property( diffuse )@piece( MultiplyDiffuseConst )* diffuseColour@end @end 18 | 19 | void main() 20 | { 21 | @property( !diffuse_map ) 22 | @property( hlms_colour ) outColour = psColour @insertpiece( MultiplyDiffuseConst );@end 23 | @property( !hlms_colour && !diffuse ) outColour = @insertpiece( lowp ) vec4(1, 1, 1, 1);@end 24 | @property( !hlms_colour && diffuse ) outColour = diffuseColour;@end 25 | @end 26 | 27 | @property( diffuse_map ) 28 | //Load base image 29 | outColour = texture( texDiffuseMap[0], psUv@value( diffuse_map_count0 ) @insertpiece( atlasOffset0 )); 30 | 31 | //Group all texture loads together to help the GPU hide the 32 | //latency (bad GL ES2 drivers won't optimize this automatically) 33 | @foreach( diffuse_map, n, 1 ) 34 | @insertpiece( lowp ) vec4 topImage@n = texture( texDiffuseMap[@n], psUv@value( diffuse_map_count@n ) @insertpiece( atlasOffset@n ));@end 35 | 36 | @foreach( diffuse_map, n, 1 ) 37 | @insertpiece( blend_mode_idx@n )@end 38 | 39 | @property( hlms_colour )outColour *= psColour @insertpiece( MultiplyDiffuseConst );@end 40 | @property( !hlms_colour && diffuse )outColour *= diffuseColour;@end 41 | @end 42 | 43 | @property( alpha_test ) 44 | if( alpha_test_threshold @insertpiece( alpha_test_cmp_func ) outColour.a ) 45 | discard;@end 46 | } 47 | -------------------------------------------------------------------------------- /common/ogre3/Hlms/UnlitMobile/GLSL/VertexShader_vs.glsl: -------------------------------------------------------------------------------- 1 | @insertpiece( SetCrossPlatformSettings ) 2 | 3 | in vec4 vertex; 4 | @property( hlms_colour )in vec4 colour; 5 | out vec4 psColour;@end 6 | 7 | @foreach( hlms_uv_count, n ) 8 | in vec@value( hlms_uv_count@n ) uv@n;@end 9 | @foreach( hlms_uv_count, n ) 10 | out vec@value( hlms_uv_count@n ) psUv@n;@end 11 | 12 | // START UNIFORM DECLARATION 13 | //Uniforms that change per material 14 | @property( hlms_texture_matrix_count )uniform mat4 texture_matrix[@value( hlms_texture_matrix_count )];@end 15 | //Uniforms that change per entity 16 | uniform mat4 worldViewProj; 17 | // END UNIFORM DECLARATION 18 | 19 | void main() 20 | { 21 | @property( !hlms_dual_paraboloid_mapping ) 22 | gl_Position = worldViewProj * vertex; 23 | @end 24 | 25 | @property( hlms_dual_paraboloid_mapping ) 26 | //Dual Paraboloid Mapping 27 | gl_Position.w = 1.0f; 28 | gl_Position.xyz = (worldViewProj * vertex).xyz; 29 | float L = length( gl_Position.xyz ); 30 | gl_Position.z += 1.0f; 31 | gl_Position.xy /= gl_Position.z; 32 | gl_Position.z = (L - NearPlane) / (FarPlane - NearPlane); 33 | @end 34 | 35 | @property( hlms_colour ) psColour = colour;@end 36 | 37 | @foreach( hlms_uv_count, n ) 38 | psUv@n = uv@n @property( hlms_texture_matrix_count@n ) * texture_matrix[@counter(CurrentTexMatrix)]@end ;@end 39 | } 40 | -------------------------------------------------------------------------------- /common/ogre3/axis.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/axis.mesh -------------------------------------------------------------------------------- /common/ogre3/barrel.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/barrel.mesh -------------------------------------------------------------------------------- /common/ogre3/cube.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/cube.mesh -------------------------------------------------------------------------------- /common/ogre3/knot.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/knot.mesh -------------------------------------------------------------------------------- /common/ogre3/materialball.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/materialball.mesh -------------------------------------------------------------------------------- /common/ogre3/rock.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/rock.mesh -------------------------------------------------------------------------------- /common/ogre3/sphere.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/sphere.mesh -------------------------------------------------------------------------------- /common/ogre3/uv_mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/ogre3/uv_mapping.png -------------------------------------------------------------------------------- /common/presets/alumininium/aluminium.material.json: -------------------------------------------------------------------------------- 1 | { 2 | "samplers" : 3 | { 4 | "Sampler_3" : 5 | { 6 | "min" : "anisotropic", 7 | "mag" : "anisotropic", 8 | "mip" : "anisotropic", 9 | "u" : "wrap", 10 | "v" : "wrap", 11 | "w" : "wrap", 12 | "miplodbias" : 0, 13 | "max_anisotropic" : 1, 14 | "compare_function" : "disabled", 15 | "border" :[1, 1, 1, 1], 16 | "min_lod" : -3.40282e+38, 17 | "max_lod" : 3.40282e+38 18 | } 19 | }, 20 | 21 | "macroblocks" : 22 | { 23 | "Macroblock_0" : 24 | { 25 | "scissor_test" : false, 26 | "depth_check" : true, 27 | "depth_write" : true, 28 | "depth_function" : "less_equal", 29 | "depth_bias_constant" : 0, 30 | "depth_bias_slope_scale" : 0, 31 | "cull_mode" : "clockwise", 32 | "polygon_mode" : "solid" 33 | } 34 | }, 35 | 36 | "blendblocks" : 37 | { 38 | "Blendblock_0" : 39 | { 40 | "alpha_to_coverage" : false, 41 | "blendmask" : "rgba", 42 | "separate_blend" : false, 43 | "src_blend_factor" : "one", 44 | "dst_blend_factor" : "zero", 45 | "blend_operation" : "add" 46 | } 47 | }, 48 | 49 | "pbs" : 50 | { 51 | 52 | "aluminium" : 53 | { 54 | "macroblock" : "Macroblock_0", 55 | "blendblock" : "Blendblock_0", 56 | "shadow_const_bias" : 0.01, 57 | "workflow" : "metallic", 58 | "diffuse" : 59 | { 60 | "value" : [1, 1, 1], 61 | "background" : [1, 1, 1, 1] 62 | }, 63 | "specular" : 64 | { 65 | "value" : [1, 1, 1] 66 | }, 67 | "metalness" : 68 | { 69 | "value" : 0.38 70 | }, 71 | "normal" : 72 | { 73 | "value" : 1.03, 74 | "texture" : "aluminum_normal.png", 75 | "sampler" : "Sampler_3" 76 | }, 77 | "roughness" : 78 | { 79 | "value" : 1, 80 | "texture" : "aluminum_roughness.png", 81 | "sampler" : "Sampler_3" 82 | }, 83 | "reflection" : 84 | { 85 | "texture" : "Tantolunden.dds", 86 | "sampler" : "Sampler_3" 87 | } 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /common/presets/alumininium/aluminium.material.json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/presets/alumininium/aluminium.material.json.png -------------------------------------------------------------------------------- /common/presets/alumininium/aluminum_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/presets/alumininium/aluminum_normal.png -------------------------------------------------------------------------------- /common/presets/alumininium/aluminum_roughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/presets/alumininium/aluminum_roughness.png -------------------------------------------------------------------------------- /common/skybox/FortPoint.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/skybox/FortPoint.dds -------------------------------------------------------------------------------- /common/skybox/Lundagatan.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/skybox/Lundagatan.dds -------------------------------------------------------------------------------- /common/skybox/SkyBoxNone.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/skybox/SkyBoxNone.dds -------------------------------------------------------------------------------- /common/skybox/SkyPostprocess.compositor: -------------------------------------------------------------------------------- 1 | compositor_node SkyPostprocessRenderingNode 2 | { 3 | in 0 rt_renderwindow 4 | 5 | target rt_renderwindow 6 | { 7 | 8 | pass clear 9 | { 10 | colour_value 0.2 0.4 0.6 1 11 | } 12 | 13 | //Render opaque stuff 14 | pass render_scene 15 | { 16 | overlays off 17 | rq_first 0 18 | rq_last 2 19 | } 20 | 21 | //Render sky after opaque stuff (performance optimization) 22 | pass render_quad 23 | { 24 | quad_normals camera_direction 25 | material SkyPostprocess 26 | } 27 | 28 | //Render transparent stuff after sky 29 | pass render_scene 30 | { 31 | overlays on 32 | rq_first 2 33 | } 34 | } 35 | } 36 | 37 | workspace SkyPostprocessWorkspace 38 | { 39 | connect_output SkyPostprocessRenderingNode 0 40 | } 41 | -------------------------------------------------------------------------------- /common/skybox/SkyPostprocess.material: -------------------------------------------------------------------------------- 1 | 2 | // GLSL shaders 3 | vertex_program SkyPostprocess_vs_GLSL glsl 4 | { 5 | source SkyPostprocess_vs.glsl 6 | default_params 7 | { 8 | param_named_auto worldViewProj worldviewproj_matrix 9 | } 10 | } 11 | 12 | fragment_program SkyPostprocess_ps_GLSL glsl 13 | { 14 | source SkyPostprocess_ps.glsl 15 | default_params 16 | { 17 | param_named skyCubemap int 0 18 | } 19 | } 20 | 21 | // HLSL shaders 22 | vertex_program SkyPostprocess_vs_HLSL hlsl 23 | { 24 | source SkyPostprocess_vs.hlsl 25 | entry_point main 26 | target vs_5_0 vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 27 | 28 | default_params 29 | { 30 | param_named_auto worldViewProj worldviewproj_matrix 31 | } 32 | } 33 | 34 | fragment_program SkyPostprocess_ps_HLSL hlsl 35 | { 36 | source SkyPostprocess_ps.hlsl 37 | entry_point main 38 | target ps_5_0 ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 39 | } 40 | 41 | // Unified definitions 42 | vertex_program SkyPostprocess_vs unified 43 | { 44 | delegate SkyPostprocess_vs_HLSL 45 | delegate SkyPostprocess_vs_GLSL 46 | } 47 | 48 | fragment_program SkyPostprocess_ps unified 49 | { 50 | delegate SkyPostprocess_ps_HLSL 51 | delegate SkyPostprocess_ps_GLSL 52 | } 53 | 54 | // Material definition 55 | material SkyPostprocess 56 | { 57 | technique 58 | { 59 | pass 60 | { 61 | depth_check on 62 | depth_write off 63 | 64 | cull_hardware none 65 | 66 | vertex_program_ref SkyPostprocess_vs 67 | { 68 | } 69 | 70 | fragment_program_ref SkyPostprocess_ps 71 | { 72 | } 73 | 74 | texture_unit 75 | { 76 | texture SkyBoxNone.dds cubic gamma 77 | filtering trilinear 78 | tex_address_mode clamp 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /common/skybox/SkyPostprocess_ps.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | uniform samplerCube skyCubemap; 4 | 5 | in block 6 | { 7 | vec3 cameraDir; 8 | } inPs; 9 | 10 | out vec3 fragColour; 11 | 12 | void main() 13 | { 14 | //Cubemaps are left-handed 15 | fragColour = texture( skyCubemap, vec3( inPs.cameraDir.xy, -inPs.cameraDir.z ) ).xyz; 16 | } 17 | -------------------------------------------------------------------------------- /common/skybox/SkyPostprocess_ps.hlsl: -------------------------------------------------------------------------------- 1 | struct PS_INPUT 2 | { 3 | float3 cameraDir : TEXCOORD0; 4 | }; 5 | 6 | TextureCube skyCubemap : register(t0); 7 | SamplerState samplerState : register(s0); 8 | 9 | float3 main 10 | ( 11 | PS_INPUT inPs 12 | ) : SV_Target0 13 | { 14 | //Cubemaps are left-handed 15 | return skyCubemap.Sample( samplerState, float3( inPs.cameraDir.xy, -inPs.cameraDir.z ) ).xyz; 16 | } 17 | -------------------------------------------------------------------------------- /common/skybox/SkyPostprocess_vs.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | 3 | in vec4 vertex; 4 | in vec3 normal; 5 | uniform mat4 worldViewProj; 6 | 7 | out gl_PerVertex 8 | { 9 | vec4 gl_Position; 10 | }; 11 | 12 | out block 13 | { 14 | vec3 cameraDir; 15 | } outVs; 16 | 17 | void main() 18 | { 19 | gl_Position = (worldViewProj * vertex).xyww; 20 | outVs.cameraDir.xyz = normal.xyz; 21 | } 22 | -------------------------------------------------------------------------------- /common/skybox/SkyPostprocess_vs.hlsl: -------------------------------------------------------------------------------- 1 | 2 | struct VS_INPUT 3 | { 4 | float4 vertex : POSITION; 5 | float3 normal : NORMAL; 6 | }; 7 | 8 | struct PS_INPUT 9 | { 10 | float3 cameraDir : TEXCOORD0; 11 | 12 | float4 gl_Position : SV_Position; 13 | }; 14 | 15 | PS_INPUT main 16 | ( 17 | VS_INPUT input, 18 | 19 | uniform matrix worldViewProj 20 | ) 21 | { 22 | PS_INPUT outVs; 23 | 24 | outVs.gl_Position = mul( worldViewProj, input.vertex ).xyww; 25 | outVs.cameraDir = input.normal; 26 | 27 | return outVs; 28 | } 29 | -------------------------------------------------------------------------------- /common/skybox/Tantolunden.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/skybox/Tantolunden.dds -------------------------------------------------------------------------------- /common/skybox/Teide.dds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/skybox/Teide.dds -------------------------------------------------------------------------------- /common/thumbs/10Pbs.material.json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/thumbs/10Pbs.material.json.png -------------------------------------------------------------------------------- /common/thumbs/BumpyMetalUnlit.material.json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/thumbs/BumpyMetalUnlit.material.json.png -------------------------------------------------------------------------------- /common/thumbs/CheckerPbs.material.json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/thumbs/CheckerPbs.material.json.png -------------------------------------------------------------------------------- /common/thumbs/StonesPbs.material.json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/common/thumbs/StonesPbs.material.json.png -------------------------------------------------------------------------------- /doc/HLMS Editor Cheat Sheet.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/doc/HLMS Editor Cheat Sheet.docx -------------------------------------------------------------------------------- /doc/HLMS Editor Cheat Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/doc/HLMS Editor Cheat Sheet.pdf -------------------------------------------------------------------------------- /doc/LICENSE - FreePBR.com and SketchUp Textures: -------------------------------------------------------------------------------- 1 | PBS textures are coming from FreePBR.com and https://www.sketchuptextureclub.com and are added to this package for learning purposes -------------------------------------------------------------------------------- /doc/LICENSE - HLMS Editor.txt: -------------------------------------------------------------------------------- 1 | HLMS Editor is distributed under the terms of the MIT Licence Agrement (https://opensource.org/licenses/MIT) -------------------------------------------------------------------------------- /doc/tests.txt: -------------------------------------------------------------------------------- 1 | Testing: 2 | ======= 3 | 4 | HLMS creation: 5 | ----------------- 6 | - Create Pbs datablock without samplerblock, macroblock and blendblock. 7 | Select 'Set current material' to the mesh in the renderwindow 8 | 9 | - Create Unlit datablock without samplerblock, macroblock and blendblock. 10 | Select 'Set current material' to the mesh in the renderwindow 11 | 12 | - Create Unlit datablock without samplerblock, macroblock and blendblock. 13 | Select 'Set current material' to the mesh in the renderwindow 14 | 15 | - Create Pbs datablock without samplerblock, macroblock and blendblock. 16 | Select 'Set current material' to the mesh in the renderwindow 17 | Choose for 'New Project' in the main menu 18 | ==> All HLMS material are removed; the mesh is gray/white 19 | 20 | - Create Pbs datablock (with difuse colour) without samplerblock, macroblock and blendblock. 21 | Select 'Set current material' to the mesh in the renderwindow 22 | Choose for 'New Hlms Pbs' in the main menu 23 | ==> The created material is still visible on the mesh. 24 | ==> A new material with name 'HlmsPbs' is created (e.g. 'HlmsPbs6'); the sequence number is incremented 25 | 26 | 27 | Painting: 28 | --------- 29 | - No HLMS material is created 30 | Choose from main menu 'Painting' > 'New painting layer' 31 | ==> This is not possible (there must be a material) 32 | 33 | - No HLMS material is created 34 | Choose from main menu 'Painting' > 'Delete selected painting layer' 35 | ==> Warning message 36 | 37 | - No HLMS material is created 38 | Create a painting layer 39 | ==> This is not possible (there must be a material) 40 | 41 | - Create Pbs datablock without samplerblock, macroblock and blendblock. 42 | Create a painting layer 43 | ==> This is possible 44 | 45 | - Create Unlit datablock without samplerblock, macroblock and blendblock. 46 | Create a painting layer 47 | ==> This is not possible (not supported) 48 | 49 | - Create Pbs datablock (with difuse colour) without samplerblock, macroblock and blendblock. 50 | Create a 2 painting layers 51 | Choose for 'New Project' in the main menu 52 | ==> All HLMS material are removed; the mesh is gray/white 53 | ==> All Painting layers are removed 54 | 55 | - Create Pbs datablock (with difuse colour) without samplerblock, macroblock and blendblock. 56 | Create a 2 painting layers 57 | Choose for 'New Hlms Pbs' in the main menu 58 | ==> A new material with name 'HlmsPbs' is created (e.g. 'HlmsPbs6'); the sequence number is incremented 59 | ==> All Painting layers are removed 60 | 61 | - Create Pbs datablock (with difuse colour) without samplerblock, macroblock and blendblock. 62 | Create a 2 painting layers 63 | Click the 'X' on the Pbs datablock node 64 | ==> All Painting layers are removed 65 | 66 | 67 | 68 | 69 | Save/Load/Export HLMS: 70 | --------------------- 71 | 72 | 73 | Meshes: 74 | ------ 75 | 76 | -------------------------------------------------------------------------------- /examples/10Pbs.material.json: -------------------------------------------------------------------------------- 1 | { 2 | "samplers" : 3 | { 4 | "Sampler_3" : 5 | { 6 | "min" : "none", 7 | "mag" : "none", 8 | "mip" : "none", 9 | "u" : "wrap", 10 | "v" : "wrap", 11 | "w" : "wrap", 12 | "miplodbias" : 0, 13 | "max_anisotropic" : 1, 14 | "compare_function" : "disabled", 15 | "border" :[1, 1, 1, 1], 16 | "min_lod" : -3.40282e+38, 17 | "max_lod" : 3.40282e+38 18 | } 19 | }, 20 | 21 | "macroblocks" : 22 | { 23 | "Macroblock_0" : 24 | { 25 | "scissor_test" : false, 26 | "depth_check" : true, 27 | "depth_write" : true, 28 | "depth_function" : "less_equal", 29 | "depth_bias_constant" : 0, 30 | "depth_bias_slope_scale" : 0, 31 | "cull_mode" : "clockwise", 32 | "polygon_mode" : "solid" 33 | } 34 | }, 35 | 36 | "blendblocks" : 37 | { 38 | "Blendblock_0" : 39 | { 40 | "alpha_to_coverage" : false, 41 | "blendmask" : "rgba", 42 | "separate_blend" : false, 43 | "src_blend_factor" : "one", 44 | "dst_blend_factor" : "zero", 45 | "blend_operation" : "add" 46 | } 47 | }, 48 | 49 | "pbs" : 50 | { 51 | 52 | "10Pbs" : 53 | { 54 | "macroblock" : "Macroblock_0", 55 | "blendblock" : "Blendblock_0", 56 | "shadow_const_bias" : 0.01, 57 | "workflow" : "specular_ogre", 58 | "diffuse" : 59 | { 60 | "value" : [1, 1, 1], 61 | "texture" : "10points.png", 62 | "sampler" : "Sampler_3" 63 | }, 64 | "specular" : 65 | { 66 | "value" : [1, 1, 1] 67 | }, 68 | "fresnel" : 69 | { 70 | "value" : 0.818, 71 | "mode" : "coeff" 72 | }, 73 | "normal" : 74 | { 75 | "value" : 1, 76 | "texture" : "floor_bump.PNG", 77 | "sampler" : "Sampler_3" 78 | }, 79 | "roughness" : 80 | { 81 | "value" : 1 82 | } 83 | } 84 | } 85 | } -------------------------------------------------------------------------------- /examples/10points.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/10points.png -------------------------------------------------------------------------------- /examples/1d_debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/1d_debug.png -------------------------------------------------------------------------------- /examples/BumpyMetal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/BumpyMetal.jpg -------------------------------------------------------------------------------- /examples/BumpyMetalUnlit.material.json: -------------------------------------------------------------------------------- 1 | { 2 | "samplers" : 3 | { 4 | "Sampler_1" : 5 | { 6 | "min" : "none", 7 | "mag" : "none", 8 | "mip" : "none", 9 | "u" : "wrap", 10 | "v" : "wrap", 11 | "w" : "wrap", 12 | "miplodbias" : 0, 13 | "max_anisotropic" : 1, 14 | "compare_function" : "disabled", 15 | "border" :[1, 1, 1, 1], 16 | "min_lod" : -3.40282e+38, 17 | "max_lod" : 3.40282e+38 18 | } 19 | }, 20 | 21 | "macroblocks" : 22 | { 23 | "Macroblock_0" : 24 | { 25 | "scissor_test" : false, 26 | "depth_check" : true, 27 | "depth_write" : true, 28 | "depth_function" : "less_equal", 29 | "depth_bias_constant" : 0, 30 | "depth_bias_slope_scale" : 0, 31 | "cull_mode" : "clockwise", 32 | "polygon_mode" : "solid" 33 | } 34 | }, 35 | 36 | "blendblocks" : 37 | { 38 | "Blendblock_0" : 39 | { 40 | "alpha_to_coverage" : false, 41 | "blendmask" : "rgba", 42 | "separate_blend" : false, 43 | "src_blend_factor" : "one", 44 | "dst_blend_factor" : "zero", 45 | "blend_operation" : "add" 46 | } 47 | }, 48 | 49 | "unlit" : 50 | { 51 | 52 | "BumpyMetalUnlit" : 53 | { 54 | "macroblock" : "Macroblock_0", 55 | "blendblock" : "Blendblock_0", 56 | "shadow_const_bias" : 0.01, 57 | "diffuse_map0" : 58 | { 59 | "texture" : "BumpyMetal.jpg", 60 | "sampler" : "Sampler_1" 61 | } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /examples/CheckerPbs.material.json: -------------------------------------------------------------------------------- 1 | { 2 | "samplers" : 3 | { 4 | "Sampler_3" : 5 | { 6 | "min" : "none", 7 | "mag" : "none", 8 | "mip" : "none", 9 | "u" : "wrap", 10 | "v" : "wrap", 11 | "w" : "wrap", 12 | "miplodbias" : 0, 13 | "max_anisotropic" : 1, 14 | "compare_function" : "disabled", 15 | "border" :[1, 1, 1, 1], 16 | "min_lod" : -3.40282e+38, 17 | "max_lod" : 3.40282e+38 18 | } 19 | }, 20 | 21 | "macroblocks" : 22 | { 23 | "Macroblock_0" : 24 | { 25 | "scissor_test" : false, 26 | "depth_check" : true, 27 | "depth_write" : true, 28 | "depth_function" : "less_equal", 29 | "depth_bias_constant" : 0, 30 | "depth_bias_slope_scale" : 0, 31 | "cull_mode" : "clockwise", 32 | "polygon_mode" : "solid" 33 | } 34 | }, 35 | 36 | "blendblocks" : 37 | { 38 | "Blendblock_0" : 39 | { 40 | "alpha_to_coverage" : false, 41 | "blendmask" : "rgba", 42 | "separate_blend" : false, 43 | "src_blend_factor" : "one", 44 | "dst_blend_factor" : "zero", 45 | "blend_operation" : "add" 46 | } 47 | }, 48 | 49 | "pbs" : 50 | { 51 | 52 | "CheckerPbs" : 53 | { 54 | "macroblock" : "Macroblock_0", 55 | "blendblock" : "Blendblock_0", 56 | "shadow_const_bias" : 0.01, 57 | "workflow" : "specular_ogre", 58 | "diffuse" : 59 | { 60 | "value" : [1, 1, 1] 61 | }, 62 | "specular" : 63 | { 64 | "value" : [1, 1, 1] 65 | }, 66 | "fresnel" : 67 | { 68 | "value" : 0.818, 69 | "mode" : "coeff" 70 | }, 71 | "roughness" : 72 | { 73 | "value" : 1 74 | }, 75 | "detail_diffuse0" : 76 | { 77 | "value" : 0.4, 78 | "texture" : "1d_debug.png", 79 | "sampler" : "Sampler_3" 80 | }, 81 | "detail_diffuse1" : 82 | { 83 | "value" : 0.8, 84 | "texture" : "checker.png", 85 | "sampler" : "Sampler_3" 86 | } 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /examples/StonesPbs.material.json: -------------------------------------------------------------------------------- 1 | { 2 | "samplers" : 3 | { 4 | "Sampler_3" : 5 | { 6 | "min" : "anisotropic", 7 | "mag" : "anisotropic", 8 | "mip" : "anisotropic", 9 | "u" : "wrap", 10 | "v" : "wrap", 11 | "w" : "wrap", 12 | "miplodbias" : 0, 13 | "max_anisotropic" : 1, 14 | "compare_function" : "disabled", 15 | "border" :[1, 1, 1, 1], 16 | "min_lod" : -3.40282e+38, 17 | "max_lod" : 3.40282e+38 18 | } 19 | }, 20 | 21 | "macroblocks" : 22 | { 23 | "Macroblock_0" : 24 | { 25 | "scissor_test" : false, 26 | "depth_check" : true, 27 | "depth_write" : true, 28 | "depth_function" : "less_equal", 29 | "depth_bias_constant" : 0, 30 | "depth_bias_slope_scale" : 0, 31 | "cull_mode" : "clockwise", 32 | "polygon_mode" : "solid" 33 | } 34 | }, 35 | 36 | "blendblocks" : 37 | { 38 | "Blendblock_0" : 39 | { 40 | "alpha_to_coverage" : false, 41 | "blendmask" : "rgba", 42 | "separate_blend" : false, 43 | "src_blend_factor" : "one", 44 | "dst_blend_factor" : "zero", 45 | "blend_operation" : "add" 46 | } 47 | }, 48 | 49 | "pbs" : 50 | { 51 | 52 | "StonesPbs" : 53 | { 54 | "macroblock" : "Macroblock_0", 55 | "blendblock" : "Blendblock_0", 56 | "shadow_const_bias" : 0.01, 57 | "workflow" : "specular_ogre", 58 | "diffuse" : 59 | { 60 | "value" : [1, 1, 1] 61 | }, 62 | "specular" : 63 | { 64 | "value" : [1, 1, 1], 65 | "texture" : "floor_ao.PNG", 66 | "sampler" : "Sampler_3" 67 | }, 68 | "fresnel" : 69 | { 70 | "value" : 0.2, 71 | "mode" : "coeff" 72 | }, 73 | "roughness" : 74 | { 75 | "value" : 1, 76 | "texture" : "floor_specular.PNG", 77 | "sampler" : "Sampler_3" 78 | }, 79 | "detail_diffuse0" : 80 | { 81 | "value" : 1, 82 | "texture" : "floor_diffuse.PNG", 83 | "sampler" : "Sampler_3" 84 | }, 85 | "detail_normal0" : 86 | { 87 | "value" : 1, 88 | "texture" : "floor_bump.PNG", 89 | "sampler" : "Sampler_3" 90 | } 91 | } 92 | } 93 | } -------------------------------------------------------------------------------- /examples/checker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/checker.png -------------------------------------------------------------------------------- /examples/example_project.hlmp: -------------------------------------------------------------------------------- 1 | hlmsEditor v1.0 2 | ../examples/example_project_materials.cfg 3 | ../examples/example_project_textures.cfg 4 | -------------------------------------------------------------------------------- /examples/example_project_materials.cfg: -------------------------------------------------------------------------------- 1 | 1 0 1 1 PBS PBS 2 | 1 1 8 3 CheckerPbs.material.json ../examples/CheckerPbs.material.json 3 | 1 1 9 3 StonesPbs.material.json ../examples/StonesPbs.material.json 4 | 1 1 10 3 10Pbs.material.json ../examples/10Pbs.material.json 5 | 2 0 2 1 Unlit Unlit 6 | 2 2 11 3 BumpyMetalUnlit.material.json ../examples/BumpyMetalUnlit.material.json 7 | -------------------------------------------------------------------------------- /examples/example_project_textures.cfg: -------------------------------------------------------------------------------- 1 | 3 0 3 1 Textures Textures 2 | 3 3 4 3 1d_debug.png ../examples/1d_debug.png 3 | 3 3 5 3 10points.png ../examples/10points.png 4 | 3 3 6 3 BumpyMetal.jpg ../examples/BumpyMetal.jpg 5 | 3 3 7 3 checker.png ../examples/checker.png 6 | 3 3 8 3 floor_ao.PNG ../examples/floor_ao.PNG 7 | 3 3 9 3 floor_bump.PNG ../examples/floor_bump.PNG 8 | 3 3 10 3 floor_diffuse.PNG ../examples/floor_diffuse.PNG 9 | 3 3 11 3 floor_specular.PNG ../examples/floor_specular.PNG 10 | -------------------------------------------------------------------------------- /examples/floor_ao.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/floor_ao.PNG -------------------------------------------------------------------------------- /examples/floor_bump.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/floor_bump.PNG -------------------------------------------------------------------------------- /examples/floor_diffuse.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/floor_diffuse.PNG -------------------------------------------------------------------------------- /examples/floor_specular.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spookyboo/HLMSEditor/090294aaae5506a048b921cab2a887a4cc1b5545/examples/floor_specular.PNG -------------------------------------------------------------------------------- /framework/header/asset_assetconstants.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_ASSET_CONSTANTS_H 22 | #define MAGUS_ASSET_CONSTANTS_H 23 | 24 | #include 25 | 26 | QT_BEGIN_NAMESPACE 27 | 28 | QT_END_NAMESPACE 29 | 30 | namespace Magus 31 | { 32 | /**************************************************************************** 33 | Constants, used in QtAssetWidget and all related classes. 34 | ***************************************************************************/ 35 | static const int ASSET_HEADER_HEIGHT = 48; 36 | static const int DEFAULT_ICON_DIMENSION = 32; 37 | static const int CONTAINER_HEADER_HEIGHT = 16; 38 | static const int CONTAINER_DEFAULT_ICON_DIMENSION = 16; 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /framework/header/asset_clickableframe.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_CLICKABLE_FRAME_H 22 | #define MAGUS_CLICKABLE_FRAME_H 23 | 24 | #include 25 | #include 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | namespace Magus 32 | { 33 | /**************************************************************************** 34 | QFrame that can be clicked by the mouse 35 | ***************************************************************************/ 36 | class QtClickableFrame : public QFrame 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | QtClickableFrame(void){} 42 | virtual ~QtClickableFrame(void) {} 43 | 44 | signals: 45 | void clicked(void); 46 | 47 | protected: 48 | void mousePressEvent(QMouseEvent *event) {emit clicked();} 49 | void enterEvent(QEvent*) 50 | {setStyleSheet("background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #737373, stop:0.2 #a6a6a6, stop:0.8 #737373, stop:1 #4a4a4a);" 51 | "border: 0px solid #000000;");} 52 | void leaveEvent(QEvent*) 53 | {setStyleSheet("background: transparent; border: 0px solid #000000;");} 54 | }; 55 | } 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /framework/header/asset_clickablelabel.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_CLICKABLE_LABEL_H 22 | #define MAGUS_CLICKABLE_LABEL_H 23 | 24 | #include 25 | #include 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | namespace Magus 32 | { 33 | /**************************************************************************** 34 | Label that can be clicked by the mouse 35 | ***************************************************************************/ 36 | class QtClickableLabel : public QLabel 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | QtClickableLabel(void){} 42 | virtual ~QtClickableLabel(void) {} 43 | 44 | signals: 45 | void clicked(void); 46 | 47 | protected: 48 | void mousePressEvent(QMouseEvent *event) {emit clicked();} 49 | void enterEvent(QEvent*) 50 | {setStyleSheet("background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #e5e5e5, stop:0.2 #a6a6a6, stop:0.8 #8a8a8a, stop:1 #4a4a4a);" 51 | "border: 0px solid #000000;");} 52 | void leaveEvent(QEvent*) 53 | {setStyleSheet("background: transparent; border: 0px solid #000000;");} 54 | }; 55 | } 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_H 22 | #define MAGUS_PROPERTY_WIDGET_H 23 | 24 | #include 25 | #include 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | namespace Magus 32 | { 33 | /**************************************************************************** 34 | Abstract property class 35 | ***************************************************************************/ 36 | class QtProperty : public QWidget 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | enum PropertyType {CHECKBOX, 42 | XYZ, 43 | XY, 44 | STRING, 45 | SELECT, 46 | SLIDER, 47 | DECIMAL, 48 | SLIDER_DECIMAL, 49 | COLOR, 50 | TEXTURE, 51 | CURVE, 52 | QUATERNION}; 53 | 54 | QtProperty(QWidget* parent) : QWidget(parent), 55 | mPropertyId(-1), 56 | mUserData(0){} 57 | virtual ~QtProperty(void){} 58 | void setEnabled(bool enabled) 59 | { 60 | QWidget::setEnabled(enabled); 61 | if (!enabled) 62 | { 63 | setStyleSheet(QString("color: #aaaaaa; font: italic;")); 64 | } 65 | } 66 | 67 | PropertyType mType; 68 | int mPropertyId; 69 | int mParentContainerId; 70 | void* mUserData; 71 | 72 | signals: 73 | void valueChanged(QtProperty* property); 74 | }; 75 | } 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_checkbox.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_CHECKBOX_H 22 | #define MAGUS_PROPERTY_WIDGET_CHECKBOX_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include "asset_propertywidget.h" 28 | 29 | QT_BEGIN_NAMESPACE 30 | 31 | QT_END_NAMESPACE 32 | 33 | namespace Magus 34 | { 35 | /**************************************************************************** 36 | CheckBox Property class 37 | ***************************************************************************/ 38 | class QtCheckBoxProperty : public QtProperty 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | QtCheckBoxProperty(const QString& title, QWidget* parent = 0); 44 | virtual ~QtCheckBoxProperty(void) {} 45 | void setValue (const bool value); 46 | const bool getValue (void) const; 47 | 48 | private slots: 49 | void propertyValueChanged(void); 50 | 51 | private: 52 | QCheckBox* mCheckBox; 53 | }; 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_curve.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_CURVE_H 22 | #define MAGUS_PROPERTY_WIDGET_CURVE_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "asset_curve_dialog.h" 29 | #include "asset_propertywidget.h" 30 | #include "asset_curve_dialog.h" 31 | 32 | QT_BEGIN_NAMESPACE 33 | 34 | QT_END_NAMESPACE 35 | 36 | namespace Magus 37 | { 38 | /**************************************************************************** 39 | Property class for curves 40 | ***************************************************************************/ 41 | class QtCurveProperty : public QtProperty 42 | { 43 | Q_OBJECT 44 | 45 | public: 46 | QtCurveProperty(const QString& title, QWidget* parent = 0); 47 | virtual ~QtCurveProperty(void) {} 48 | void setIconDir(const QString& iconDir); // Also sets the static image 49 | void setCurveSize(const QSize& size); 50 | 51 | private slots: 52 | void propertyValueChanged(void); 53 | void dialogButtonClicked(void); 54 | 55 | private: 56 | QString mIconDir; 57 | QtCurveDialog* mCurveDialog; 58 | QLabel* mCurveLabel; 59 | QPixmap mCurvePixmap; 60 | QSize mCurveSize; 61 | QPushButton* mDialogButton; 62 | }; 63 | } 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_decimal.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_DECIMAL_H 22 | #define MAGUS_PROPERTY_WIDGET_DECIMAL_H 23 | 24 | #include 25 | #include 26 | #include "asset_propertywidget.h" 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | QT_END_NAMESPACE 31 | 32 | namespace Magus 33 | { 34 | /**************************************************************************** 35 | Property class to fill in decimal values 36 | ***************************************************************************/ 37 | class QtDecimalProperty : public QtProperty 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | QtDecimalProperty(const QString& title, QWidget* parent = 0); 43 | virtual ~QtDecimalProperty(void) {} 44 | void setValue (const double value); 45 | const double getValue (void) const; 46 | int getPrecision(void) {return mPrecision;} 47 | void setPrecision(int precision) {mPrecision = precision;} 48 | 49 | private slots: 50 | void propertyValueChanged(void); 51 | 52 | private: 53 | QLineEdit* mDecimal; 54 | int mPrecision; 55 | QRegExp mRegularExpression; 56 | }; 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_quaternion.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_QUATERNION_H 22 | #define MAGUS_PROPERTY_WIDGET_QUATERNION_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "asset_propertywidget.h" 29 | 30 | QT_BEGIN_NAMESPACE 31 | 32 | QT_END_NAMESPACE 33 | 34 | namespace Magus 35 | { 36 | /**************************************************************************** 37 | Property class to fill in X, Y and Z values 38 | ***************************************************************************/ 39 | class QtQuaternionProperty : public QtProperty 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | QtQuaternionProperty(const QString& title, qreal w = 0.0, qreal x = 0.0, qreal y = 0.0, qreal z = 0.0, QWidget* parent = 0); 45 | virtual ~QtQuaternionProperty(void) {} 46 | void setQuaternion (qreal w, qreal x, qreal y, qreal z); 47 | void setQuaternion (const QQuaternion& q); 48 | void setW (qreal w); 49 | void setX (qreal x); 50 | void setY (qreal y); 51 | void setZ (qreal z); 52 | const qreal getW (void) const; 53 | const qreal getX (void) const; 54 | const qreal getY (void) const; 55 | const qreal getZ (void) const; 56 | int getPrecision(void) {return mPrecision;} 57 | void setPrecision(int precision) {mPrecision = precision;} 58 | 59 | private slots: 60 | void propertyValueChanged(void); 61 | 62 | private: 63 | QLineEdit* mWEdit; 64 | QLineEdit* mXEdit; 65 | QLineEdit* mYEdit; 66 | QLineEdit* mZEdit; 67 | int mPrecision; 68 | QRegExp mRegularExpression; 69 | }; 70 | } 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_select.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_SELECT_H 22 | #define MAGUS_PROPERTY_WIDGET_SELECT_H 23 | 24 | #include 25 | #include 26 | #include "asset_propertywidget.h" 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | QT_END_NAMESPACE 31 | 32 | namespace Magus 33 | { 34 | /**************************************************************************** 35 | Property class with a selection by means of a combobox 36 | ***************************************************************************/ 37 | class QtSelectProperty : public QtProperty 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | QtSelectProperty(const QString& title, QWidget* parent = 0); 43 | virtual ~QtSelectProperty(void) {} 44 | void addValues(const QStringList& stringList, int maxVisibleItems = 5); 45 | int getCurrentIndex(void); 46 | const QString& getCurrentText(void); 47 | void setCurentIndex(int index); 48 | void setCurrentText(const QString& value); 49 | 50 | private slots: 51 | void propertyValueChanged(void); 52 | 53 | private: 54 | QString selectedText; 55 | QComboBox* mList; 56 | }; 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_slider.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_SLIDER_H 22 | #define MAGUS_PROPERTY_WIDGET_SLIDER_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include "asset_propertywidget.h" 28 | 29 | QT_BEGIN_NAMESPACE 30 | 31 | QT_END_NAMESPACE 32 | 33 | namespace Magus 34 | { 35 | /**************************************************************************** 36 | Property class for int values, using a slider 37 | ***************************************************************************/ 38 | class QtSliderProperty : public QtProperty 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | QtSliderProperty(const QString& title, QWidget* parent = 0); 44 | virtual ~QtSliderProperty(void) {} 45 | void setSliderRange (int min, int max, int step); 46 | void setValue (int value); 47 | void setValue (float value); 48 | int getIntValue (void) const; 49 | float getFloatValue (void) const; 50 | 51 | private slots: 52 | void editValueChanged(void); 53 | void sliderValueChanged(void); 54 | 55 | private: 56 | QSlider* mSlider; 57 | QLineEdit* mEdit; 58 | QRegExp mRegularExpression; 59 | }; 60 | } 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_string.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_STRING_H 22 | #define MAGUS_PROPERTY_WIDGET_STRING_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "asset_propertywidget.h" 29 | 30 | QT_BEGIN_NAMESPACE 31 | 32 | QT_END_NAMESPACE 33 | 34 | namespace Magus 35 | { 36 | /**************************************************************************** 37 | Property class to fill in string values 38 | ***************************************************************************/ 39 | class QtStringProperty : public QtProperty 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | QtStringProperty(const QString& title, QWidget* parent = 0); 45 | virtual ~QtStringProperty(void) {} 46 | void setString (const QString& str); 47 | const QString& getString (void); 48 | 49 | private slots: 50 | void propertyValueChanged(void); 51 | 52 | private: 53 | QLineEdit* mStringEdit; 54 | QString mStringValue; 55 | }; 56 | } 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_texture.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_TEXTURE_H 22 | #define MAGUS_PROPERTY_WIDGET_TEXTURE_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include "asset_propertywidget.h" 30 | 31 | QT_BEGIN_NAMESPACE 32 | 33 | QT_END_NAMESPACE 34 | 35 | namespace Magus 36 | { 37 | /**************************************************************************** 38 | Property class for textures 39 | ***************************************************************************/ 40 | class QtTextureProperty : public QtProperty 41 | { 42 | Q_OBJECT 43 | 44 | public: 45 | QtTextureProperty(const QString& title, QWidget* parent = 0); 46 | virtual ~QtTextureProperty(void) {} 47 | void setTextureFileName(const QString& fileNameTexture); 48 | void setSearchPath(const QString& searchPath); // Used by the texture dialog to search for textures 49 | const QString& getTextureFileName(void); 50 | const QString& getTextureBaseFileName(void); 51 | const QString& getPathTexture(void); 52 | void setTextureSize(const QSize& size); 53 | 54 | private slots: 55 | void propertyValueChanged(void); 56 | void dialogButtonClicked(void); 57 | 58 | private: 59 | QString mFileNameTexture; // Fully qualified filename (path + filename) 60 | QString mBaseFileNameTexture; // Filename without path 61 | QString mPathTexture; // Path without filename 62 | QString mSearchPath; 63 | QLabel* mTextureLabel; 64 | QLineEdit* mTextureNameLabel; 65 | QPixmap mTexturePixmap; 66 | QSize mTextureSize; 67 | QPushButton* mDialogButton; 68 | }; 69 | } 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /framework/header/asset_propertywidget_xy.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_PROPERTY_WIDGET_XY_H 22 | #define MAGUS_PROPERTY_WIDGET_XY_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "asset_propertywidget.h" 29 | 30 | QT_BEGIN_NAMESPACE 31 | 32 | QT_END_NAMESPACE 33 | 34 | namespace Magus 35 | { 36 | /**************************************************************************** 37 | Property class to fill in X and Y 38 | ***************************************************************************/ 39 | class QtXYProperty : public QtProperty 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | QtXYProperty(const QString& title, qreal x = 0.0, qreal y = 0.0, QWidget* parent = 0); 45 | virtual ~QtXYProperty(void) {} 46 | void setXY (qreal x, qreal y); 47 | void setX (qreal x); 48 | void setX (qreal x, bool block); 49 | void setY (qreal y); 50 | void setY (qreal y, bool block); 51 | const qreal getX (void) const; 52 | const qreal getY (void) const; 53 | int getPrecision(void) {return mPrecision;} 54 | void setPrecision(int precision) {mPrecision = precision;} 55 | void setLabelX (const QString& label); 56 | void setLabelY (const QString& label); 57 | 58 | private slots: 59 | void propertyValueChanged(void); 60 | 61 | private: 62 | QLineEdit* mXEdit; 63 | QLineEdit* mYEdit; 64 | QLabel* mXlabel; 65 | QLabel* mYlabel; 66 | int mPrecision; 67 | QRegExp mRegularExpression; 68 | }; 69 | } 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /framework/header/magus_treewidget.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_TREEWIDGET_H 22 | #define MAGUS_TREEWIDGET_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | QT_BEGIN_NAMESPACE 30 | 31 | QT_END_NAMESPACE 32 | 33 | namespace Magus 34 | { 35 | /**************************************************************************** 36 | The QtTreeWidget is a QTreeWidget with convenience functions regarding 37 | drag and drop. 38 | ***************************************************************************/ 39 | class QtTreeWidget : public QTreeWidget 40 | { 41 | Q_OBJECT 42 | 43 | public: 44 | QtTreeWidget(QWidget* parent = 0); 45 | virtual ~QtTreeWidget(void); 46 | void addIntValueToMimeData (int key, int value); 47 | 48 | protected: 49 | virtual QMimeData* mimeData(const QList items) const; 50 | virtual QStringList mimeTypes() const; 51 | virtual Qt::DropActions supportedDropActions() const; 52 | virtual bool dropMimeData (QTreeWidgetItem* parent, int index, const QMimeData * data, Qt::DropAction action) 53 | { 54 | return true; 55 | }; 56 | 57 | private: 58 | QStringList mTypes; 59 | QMap mKeyValueMap; 60 | }; 61 | } 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /framework/header/node_connection.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_NODE_CONNECTION_H 22 | #define MAGUS_NODE_CONNECTION_H 23 | 24 | #include 25 | #include 26 | #include "node_constants.h" 27 | //#include "node_port.h" 28 | 29 | QT_BEGIN_NAMESPACE 30 | 31 | QT_END_NAMESPACE 32 | 33 | namespace Magus 34 | { 35 | class QtPort; 36 | class QtNode; 37 | 38 | /**************************************************************************** 39 | QtConnection establishes a connection between two ports of different nodes. 40 | Depending on the allowed porttypes, this connection may or may not be 41 | established. 42 | ***************************************************************************/ 43 | class QtConnection : public QGraphicsPathItem 44 | { 45 | public: 46 | QtConnection(QtPort* basePort, QGraphicsPathItem* parent = 0); 47 | virtual ~QtConnection(void); 48 | 49 | void setSelected(bool selected); // TEST 50 | 51 | // Redraw the path of the spline 52 | void updatePath(const QPointF& altTargetPos = QPointF(0.0f, 0.0f)); 53 | 54 | // Set the base port (needed when the connection is attached to another base port) 55 | void setBasePort(QtPort* basePort); 56 | QtPort* getBasePort(void); 57 | 58 | // Set the target port 59 | void setTargetPort(QtPort* targetPort); 60 | QtPort* getTargetPort(void); 61 | 62 | // Set the color of the line 63 | void setColor(const QColor& color); 64 | 65 | // Determines whether a given node is connected to this connection 66 | bool isNodeConnectedToThisConnection(QtNode* node); 67 | 68 | private: 69 | QtPort* mBasePort; 70 | QtPort* mTargetPort; 71 | QColor mColor; 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /framework/header/node_scene.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_NODE_SCENE_H 22 | #define MAGUS_NODE_SCENE_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | QT_END_NAMESPACE 31 | 32 | namespace Magus 33 | { 34 | /**************************************************************************** 35 | * Subclass of a QGraphicsScene. This is needed to prevent that a right 36 | * mousebutton press disables selected nodes. A right mousebutton press is 37 | * used to show a context menu (if enabled). Some contextmenu actions apply 38 | * to the selected nodes. 39 | ***************************************************************************/ 40 | class QtNodeGraphicsScene : public QGraphicsScene 41 | { 42 | public: 43 | QtNodeGraphicsScene(QObject* parent = 0) : QGraphicsScene(parent){} 44 | virtual ~QtNodeGraphicsScene(void){} 45 | 46 | void mousePressEvent(QGraphicsSceneMouseEvent *event) 47 | { 48 | if (event->button() == Qt::RightButton) 49 | { 50 | event->accept(); 51 | return; 52 | } 53 | QGraphicsScene::mousePressEvent(event); 54 | } 55 | }; 56 | 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /framework/header/node_view.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MAGUS_NODE_VIEW_H 22 | #define MAGUS_NODE_VIEW_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | QT_END_NAMESPACE 31 | 32 | namespace Magus 33 | { 34 | /**************************************************************************** 35 | * Subclass of a QGraphicsView. This is needed for accepting dropped 36 | * content 37 | ***************************************************************************/ 38 | class QtNodeGraphicsView : public QGraphicsView 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | QtNodeGraphicsView(QWidget* parent = 0) : QGraphicsView(parent) 44 | { 45 | setAcceptDrops(true); 46 | } 47 | virtual ~QtNodeGraphicsView(void){} 48 | 49 | signals: 50 | // Emitted when something is dropped 51 | // ObjectName is the class name of the object 52 | // name is the identifier of the object, for example a filename 53 | void dropped(const QString& objectName, const QString& name); 54 | 55 | protected: 56 | virtual void dropEvent(QDropEvent* event) 57 | { 58 | QString name = event->mimeData()->text(); 59 | QString objectName = event->mimeData()->objectName(); 60 | emit dropped (objectName, name); 61 | event->acceptProposedAction(); 62 | } 63 | 64 | virtual void dragEnterEvent(QDragEnterEvent *event) 65 | { 66 | event->acceptProposedAction(); 67 | } 68 | 69 | virtual void dragMoveEvent(QDragMoveEvent *event) 70 | { 71 | event->acceptProposedAction(); 72 | } 73 | }; 74 | 75 | } 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /framework/header/ogre_prereqs.h: -------------------------------------------------------------------------------- 1 | #ifndef QTOGREPREREQS_H 2 | #define QTOGREPREREQS_H 3 | 4 | #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 5 | #define QT_5 6 | #endif 7 | 8 | #ifdef QT_5 9 | # include 10 | #else 11 | # include 12 | #endif 13 | 14 | #if defined(Q_OS_WIN) 15 | #define GL_CONTEXT HGLRC 16 | #else 17 | #include 18 | #define GL_CONTEXT GLXContext 19 | 20 | //Hack: Xlib.h (indirectly added by glx.h) do a '#define Bool int', 21 | //breaking rapidjson, define 'None' to a long, breaking lots of Ogre 22 | //enumerations and also a 'KeyPress', breaking the QEvent::KeyPress. 23 | //FIXME: maybe there's a better way to workaround it than doing those 24 | //undef's bellow. 25 | #ifdef Bool 26 | #undef Bool 27 | #endif 28 | #ifdef None 29 | #undef None 30 | #endif 31 | #ifdef KeyPress 32 | #undef KeyPress 33 | #endif 34 | 35 | #endif 36 | 37 | 38 | 39 | 40 | #endif // QTOGREPREREQS_H 41 | -------------------------------------------------------------------------------- /framework/src/asset_propertywidget_checkbox.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include 23 | #include 24 | #include "asset_propertywidget_checkbox.h" 25 | 26 | namespace Magus 27 | { 28 | //****************************************************************************/ 29 | QtCheckBoxProperty::QtCheckBoxProperty(const QString& title, QWidget* parent) : QtProperty(parent) 30 | { 31 | QVBoxLayout* mainLayout = new QVBoxLayout; 32 | QHBoxLayout* horizontalLayout = new QHBoxLayout; 33 | mainLayout->setContentsMargins(5, 0, 5, 0); 34 | QLabel* label = new QLabel(title); 35 | mCheckBox = new QCheckBox(); 36 | mCheckBox->setStyleSheet(QString("color: #c8c8c8;spacing: 5px;background: transparent;")); 37 | connect(mCheckBox, SIGNAL(stateChanged(int)), this, SLOT(propertyValueChanged(void))); 38 | 39 | // Layout 40 | horizontalLayout->addWidget(label, 1); 41 | horizontalLayout->addWidget(mCheckBox, 2); 42 | mainLayout->addLayout(horizontalLayout); 43 | setLayout(mainLayout); 44 | mType = CHECKBOX; 45 | } 46 | 47 | //****************************************************************************/ 48 | void QtCheckBoxProperty::setValue (const bool value) 49 | { 50 | mCheckBox->setChecked(value); 51 | } 52 | 53 | //****************************************************************************/ 54 | const bool QtCheckBoxProperty::getValue (void) const 55 | { 56 | return mCheckBox->isChecked(); 57 | } 58 | 59 | //****************************************************************************/ 60 | void QtCheckBoxProperty::propertyValueChanged(void) 61 | { 62 | emit valueChanged(this); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /framework/src/asset_propertywidget_string.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include 23 | #include 24 | #include 25 | #include "asset_propertywidget_string.h" 26 | 27 | namespace Magus 28 | { 29 | //****************************************************************************/ 30 | QtStringProperty::QtStringProperty(const QString& title, QWidget* parent) : QtProperty(parent) 31 | { 32 | QVBoxLayout* mainLayout = new QVBoxLayout; 33 | QHBoxLayout* horizontalLayout = new QHBoxLayout; 34 | mainLayout->setContentsMargins(5, 0, 5, 0); 35 | QLabel* label = new QLabel(title); 36 | mStringEdit = new QLineEdit; 37 | mStringValue = QString(""); 38 | connect(mStringEdit, SIGNAL(textEdited(QString)), this, SLOT(propertyValueChanged(void))); 39 | 40 | // Layout 41 | horizontalLayout->addWidget(label, 1); 42 | horizontalLayout->addWidget(mStringEdit, 2); 43 | mainLayout->addLayout(horizontalLayout); 44 | setLayout(mainLayout); 45 | mType = STRING; 46 | } 47 | 48 | //****************************************************************************/ 49 | void QtStringProperty::setString (const QString& str) 50 | { 51 | mStringEdit->setText(str); 52 | } 53 | 54 | //****************************************************************************/ 55 | const QString& QtStringProperty::getString (void) 56 | { 57 | mStringValue = mStringEdit->text(); 58 | return mStringValue; 59 | } 60 | 61 | //****************************************************************************/ 62 | void QtStringProperty::propertyValueChanged(void) 63 | { 64 | emit valueChanged(this); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /framework/src/magus_treewidget.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include "magus_treewidget.h" 23 | #include 24 | 25 | namespace Magus 26 | { 27 | //****************************************************************************/ 28 | QtTreeWidget::QtTreeWidget(QWidget* parent) : QTreeWidget(parent) 29 | { 30 | mTypes.append(QString("test")); 31 | } 32 | 33 | //****************************************************************************/ 34 | QtTreeWidget::~QtTreeWidget(void) 35 | { 36 | } 37 | 38 | //****************************************************************************/ 39 | void QtTreeWidget::addIntValueToMimeData (int key, int value) 40 | { 41 | mKeyValueMap[key] = value; 42 | } 43 | 44 | //****************************************************************************/ 45 | QMimeData* QtTreeWidget::mimeData(const QList items) const 46 | { 47 | QMimeData* mimeData = new QMimeData(); 48 | QMap map = mKeyValueMap; 49 | QByteArray encodedData; 50 | mimeData->setObjectName(objectName()); 51 | mimeData->setParent(parent()); 52 | 53 | QDataStream stream(&encodedData, QIODevice::WriteOnly); 54 | QMap::iterator i; 55 | for (i = map.begin(); i != map.end(); ++i) 56 | stream << i.key() << i.value(); 57 | 58 | mimeData->setData(QString("test"), encodedData); 59 | 60 | return mimeData; 61 | } 62 | 63 | //****************************************************************************/ 64 | Qt::DropActions QtTreeWidget::supportedDropActions() const 65 | { 66 | return Qt::CopyAction | Qt::MoveAction; 67 | } 68 | 69 | //****************************************************************************/ 70 | QStringList QtTreeWidget::mimeTypes() const 71 | { 72 | return mTypes; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /import/README.md: -------------------------------------------------------------------------------- 1 | # HLMS Editor 2 | This directory is used for importing models and projects. The import directory can be changed in ../bin/settings.cfg (change importPath = "../import/") -------------------------------------------------------------------------------- /source/header/brush_widget.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef BRUSH_WIDGET_H 22 | #define BRUSH_WIDGET_H 23 | 24 | #include 25 | #include "tool_default_texturewidget.h" 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | class BrushPresetDockWidget; 32 | 33 | /**************************************************************************** 34 | Main class for brush widget. This widgets displays brushes. 35 | ***************************************************************************/ 36 | class BrushWidget : public QWidget 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | BrushWidget(const QString& brushDir, BrushPresetDockWidget* brushPresetDockWidget, QWidget* parent = 0); 42 | ~BrushWidget(void); 43 | 44 | signals: 45 | void brushDoubleClicked(const QString& name, const QString& baseName); 46 | 47 | private slots: 48 | void handleBrushDoubleClicked(const QString& name, const QString& baseName); 49 | void handleContextMenuSelected (QAction* action, const QString& name, const QString& baseName); 50 | 51 | protected: 52 | void loadBrushesRecursively(const QString& searchPath); 53 | 54 | private: 55 | BrushPresetDockWidget* mBrushPresetDockWidget; // Reference to the dockwidget that contains this widget 56 | Magus::QtDefaultTextureWidget* mTextureWidget; 57 | QWidget* mParent; 58 | QString mBrushDir; 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /source/header/central_dockwidget.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef CENTRAL_DOCKWIDGET_H 22 | #define CENTRAL_DOCKWIDGET_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | QT_BEGIN_NAMESPACE 29 | QT_END_NAMESPACE 30 | 31 | class MainWindow; 32 | 33 | /**************************************************************************** 34 | This class represents a DockWidget 35 | ***************************************************************************/ 36 | class CentralDockWidget : public QDockWidget 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | CentralDockWidget(QString title, MainWindow* parent, Qt::WindowFlags flags = 0); 42 | ~CentralDockWidget(void); 43 | void addDockWidget(Qt::DockWidgetArea area, QDockWidget* dockWidget); 44 | 45 | private slots: 46 | 47 | private: 48 | MainWindow* mParent; 49 | QMainWindow* mInnerMain; 50 | }; 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /source/header/clipboard_widget.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef SAMPLER_CLIPBOARD_WIDGET_H 22 | #define SAMPLER_CLIPBOARD_WIDGET_H 23 | 24 | #include 25 | #include "tool_generic_assetwidget.h" 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | class BrushPresetDockWidget; 32 | 33 | /**************************************************************************** 34 | Main class for Clipboard widget. This widgets currently displays samplers that 35 | are temporary stored for convenience. 36 | ***************************************************************************/ 37 | class ClipboardWidget : public QWidget 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | ClipboardWidget(const QString& ClipboardDir, BrushPresetDockWidget* brushPresetDockWidget, QWidget* parent = 0); 43 | ~ClipboardWidget(void); 44 | void addSamplerblockToClipboard (const QString& filename); // Add a samplerblock json file to the clipboard 45 | void addPbsDatablockToClipboard (const QString& filename); // Add a pbs json file to the clipboard 46 | 47 | signals: 48 | void clipboardDoubleClicked(const QString& name, const QString& baseName); 49 | 50 | private slots: 51 | void handleDoubleClicked(const QString& fileName, const QString& baseName); 52 | void handleContextMenuSelected (QAction* action, const QString& name, const QString& baseName); 53 | 54 | protected: 55 | bool isSamplerClip(const QString& filename); // Determine clip type 56 | bool isPbsClip(const QString& filename); // Determine clip type 57 | void loadClips (const QString& searchPath); 58 | 59 | private: 60 | BrushPresetDockWidget* mBrushPresetDockWidget; // Reference to the dockwidget that contains this widget 61 | Magus::QtGenericAssetWidget* mGenericAssetWidget; 62 | QWidget* mParent; 63 | QString mClipboardDir; 64 | }; 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /source/header/config_dialog.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is part of the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef CONFIG_DIALOG_H 22 | #define CONFIG_DIALOG_H 23 | 24 | #include 25 | #include 26 | 27 | QT_BEGIN_NAMESPACE 28 | class QListWidget; 29 | class QListWidgetItem; 30 | class QStackedWidget; 31 | class MainWindow; 32 | QT_END_NAMESPACE 33 | 34 | class GeneralPage; 35 | class HlmsPage; 36 | 37 | class ConfigDialog : public QDialog 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | ConfigDialog(MainWindow* parent); 43 | void skyBoxTableUpdated(bool enabled, QString skyboxName); 44 | 45 | GeneralPage* mGeneralPage; 46 | HlmsPage* mHlmsPage; 47 | void loadSettings(void); 48 | void saveSettings(void); 49 | QString mImportPath; 50 | unsigned int mSamplerblockFilterIndex; 51 | unsigned int mNumberOfSkyBoxes; 52 | QMap mSkyBoxMap; 53 | 54 | public slots: 55 | void changePage(QListWidgetItem *current, QListWidgetItem *previous); 56 | void okAndAccept(void); 57 | 58 | private: 59 | void createIcons(); 60 | QListWidget *contentsWidget; 61 | QStackedWidget *pagesWidget; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /source/header/config_pages.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is part of the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef CONFIG_PAGES_H 22 | #define CONFIG_PAGES_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include "config_dialog.h" 32 | 33 | //****************************************************************************/ 34 | class GeneralPage : public QWidget 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | GeneralPage(ConfigDialog *parent = 0); 40 | void setSkyBoxMap (QMap skyBoxMap); 41 | 42 | private slots: 43 | void doSetImportDir (void); 44 | void doResetAllSettings (void); 45 | void doSkyBoxCellChanged(int row,int col); 46 | void doLoadSkyboxFile (void); 47 | 48 | protected: 49 | void loadSettings(void); 50 | void saveSettings(void); 51 | 52 | private: 53 | ConfigDialog* mParent; 54 | QString mImportPath; 55 | QLineEdit* mImportEdit; 56 | QTableWidget* mSkyboxTableWidget; 57 | bool mSkyboxTableWidgetSignalsEnabled; 58 | QLineEdit* mLoadSkyboxEdit; 59 | QString mSkyboxFullQualifiedFileName; 60 | }; 61 | 62 | //****************************************************************************/ 63 | class HlmsPage : public QWidget 64 | { 65 | Q_OBJECT 66 | 67 | public: 68 | HlmsPage(ConfigDialog *parent = 0); 69 | 70 | private slots: 71 | void doFilterChanged(void); 72 | 73 | private: 74 | ConfigDialog* mParent; 75 | QComboBox* mFilterList; 76 | }; 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /source/header/hlms_editor_plugin_action.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef __HLMS_EDITOR_PLUGIN_ACTION_H__ 22 | #define __HLMS_EDITOR_PLUGIN_ACTION_H__ 23 | 24 | #include 25 | #include "hlms_editor_plugin.h" 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | class PluginAction : public QAction 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | // Public plugin 37 | Ogre::HlmsEditorPlugin* mHlmsEditorPlugin; 38 | 39 | // Constructor 40 | PluginAction (Ogre::HlmsEditorPlugin* plugin, const QString& text, QObject* parent); 41 | 42 | // Destructor 43 | virtual ~PluginAction (void); 44 | 45 | signals: 46 | void pluginActionTriggered (Ogre::HlmsEditorPlugin* plugin); 47 | 48 | private slots: 49 | void interceptTriggered (bool checked); 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /source/header/hlms_editor_plugin_properties_dialog.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is part of the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef PLUGIN_PROPERTIES_DIALOG_H 22 | #define PLUGIN_PROPERTIES_DIALOG_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "hlms_editor_plugin.h" 29 | 30 | QT_BEGIN_NAMESPACE 31 | QT_END_NAMESPACE 32 | 33 | class MainWindow; 34 | class PluginPropertiesDialog : public QDialog 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | struct PropertyAndWidgetStruct 40 | { 41 | Ogre::HlmsEditorPluginData::PLUGIN_PROPERTY property; 42 | QWidget* widget; 43 | }; 44 | 45 | PluginPropertiesDialog (MainWindow* parent); 46 | void addProperty (Ogre::HlmsEditorPluginData::PLUGIN_PROPERTY property); 47 | std::map getProperties (void); 48 | 49 | public slots: 50 | void handleOkAndAccept(void); 51 | 52 | private: 53 | QVBoxLayout* mMainLayout; 54 | QVBoxLayout* mPropertiesLayout; 55 | QDialogButtonBox* mButtonBox; 56 | QHBoxLayout* mButtonBoxLayout; 57 | std::map mPropertyAndWidgetMap; 58 | std::map mProperties; 59 | }; 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /source/header/hlms_node_unlit_datablock.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef HLMS_NODE_UNLIT_DATABLOCK_H 22 | #define HLMS_NODE_UNLIT_DATABLOCK_H 23 | 24 | #include 25 | #include "node_node.h" 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | /**************************************************************************** 32 | * ... 33 | ***************************************************************************/ 34 | class HlmsNodeUnlitDatablock : public Magus::QtNode 35 | { 36 | public: 37 | HlmsNodeUnlitDatablock(QString title, QGraphicsItem* parent = 0); 38 | virtual ~HlmsNodeUnlitDatablock(void); 39 | 40 | // Getters 41 | const QString& getName (void) {return mName;} 42 | unsigned int getAlphaTest(void) const {return mAlphaTest;} 43 | const QColor& getColour (void) {return mColour;} 44 | float getAlphaTestThreshold(void){return mAlphaTestThreshold;} 45 | 46 | // Setters 47 | void setName (const QString& name) {mName = name;} 48 | void setColour (const QColor& colour) {mColour = colour;} 49 | void setAlphaTest(unsigned int alphaTest) {mAlphaTest = alphaTest;} 50 | void setAlphaTestThreshold(float alphaTestThreshold){mAlphaTestThreshold = alphaTestThreshold;} 51 | 52 | private: 53 | QString mName; 54 | unsigned int mAlphaTest; 55 | float mAlphaTestThreshold; 56 | QColor mColour; 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /source/header/hlms_properties_blenddblock.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef HLMS_PROPERTIES_BLENDBLOCK_H 22 | #define HLMS_PROPERTIES_BLENDBLOCK_H 23 | 24 | #include 25 | #include "asset_assetwidget.h" 26 | #include "hlms_node_blenddblock.h" 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | QT_END_NAMESPACE 31 | 32 | using namespace Magus; // Use 'namespace Magus' because of issues with signal and slots; 33 | // eg. void nodeSelected(Magus::QtNode* node); does not work, but 34 | // void nodeSelected(QtNode* node); does work! 35 | 36 | class PropertiesDockWidget; 37 | class HlmsPropertiesBlendblock : public QWidget 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | HlmsPropertiesBlendblock(const QString& fileNameIcon, 43 | PropertiesDockWidget* propertiesDockWidget, 44 | QWidget* parent = 0); 45 | virtual ~HlmsPropertiesBlendblock(void); 46 | void setObject (HlmsNodeBlendblock* hlmsNodeBlendblock); 47 | 48 | private slots: 49 | void propertyValueChanged(QtProperty* property); 50 | void infoClicked(void); 51 | 52 | private: 53 | HlmsNodeBlendblock* mHlmsNodeBlendblock; 54 | Magus::QtAssetWidget* mAssetWidget; 55 | PropertiesDockWidget* mPropertiesDockWidget; 56 | void adjustTransparent(unsigned int indexSourceBF, unsigned int indexDestBF); 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /source/header/hlms_properties_macroblock.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef HLMS_PROPERTIES_MACROBLOCK_H 22 | #define HLMS_PROPERTIES_MACROBLOCK_H 23 | 24 | #include 25 | #include "asset_assetwidget.h" 26 | #include "hlms_node_macroblock.h" 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | QT_END_NAMESPACE 31 | 32 | using namespace Magus; // Use 'namespace Magus' because of issues with signal and slots; 33 | 34 | class PropertiesDockWidget; 35 | class HlmsPropertiesMacroblock : public QWidget 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | HlmsPropertiesMacroblock(const QString& fileNameIcon, 41 | PropertiesDockWidget* propertiesDockWidget, 42 | QWidget* parent = 0); 43 | virtual ~HlmsPropertiesMacroblock(void); 44 | void setObject (HlmsNodeMacroblock* hlmsNodeMacroblock); 45 | 46 | private slots: 47 | void propertyValueChanged(QtProperty* property); 48 | void infoClicked(void); 49 | 50 | private: 51 | HlmsNodeMacroblock* mHlmsNodeMacroblock; 52 | Magus::QtAssetWidget* mAssetWidget; 53 | PropertiesDockWidget* mPropertiesDockWidget; 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /source/header/hlms_properties_unlit_datablock.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef HLMS_PROPERTIES_UNLITDATABLOCK_H 22 | #define HLMS_PROPERTIES_UNLITDATABLOCK_H 23 | 24 | #include 25 | #include "asset_assetwidget.h" 26 | #include "hlms_node_unlit_datablock.h" 27 | 28 | QT_BEGIN_NAMESPACE 29 | 30 | QT_END_NAMESPACE 31 | 32 | using namespace Magus; // Use 'namespace Magus' because of issues with signal and slots; 33 | 34 | class PropertiesDockWidget; 35 | class HlmsPropertiesUnlitDatablock : public QWidget 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | HlmsPropertiesUnlitDatablock(const QString& fileNameIcon, 41 | PropertiesDockWidget* propertiesDockWidget, 42 | QWidget* parent = 0); 43 | virtual ~HlmsPropertiesUnlitDatablock(void); 44 | void setObject (HlmsNodeUnlitDatablock* hlmsNodeUnlitDatablock); 45 | 46 | private slots: 47 | void propertyValueChanged(QtProperty* property); 48 | void infoClicked(void); 49 | 50 | private: 51 | HlmsNodeUnlitDatablock* mHlmsNodeUnlitDatablock; 52 | Magus::QtAssetWidget* mAssetWidget; 53 | PropertiesDockWidget* mPropertiesDockWidget; 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /source/header/material_browser_dialog.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2014 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef MATERIAL_BROWSER_DIALOG_H 22 | #define MATERIAL_BROWSER_DIALOG_H 23 | 24 | #include 25 | #include 26 | #include 27 | #include "constants.h" 28 | #include "material_browser.h" 29 | 30 | QT_BEGIN_NAMESPACE 31 | 32 | QT_END_NAMESPACE 33 | 34 | /**************************************************************************** 35 | This is the material browser 36 | ***************************************************************************/ 37 | class MaterialBrowserDialog : public QDialog 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | MaterialBrowserDialog(QWidget* parent = 0, Qt::WindowFlags f = 0); 43 | ~MaterialBrowserDialog(void); 44 | void addMaterial(const QString& baseNameJson, 45 | const QString& fullNameJson, 46 | const QString& baseNameThumb, 47 | EditorHlmsTypes type); 48 | QVector& getResources (void); 49 | void setResources (const QVector& resources); 50 | void initResourceTree(void); 51 | void clearResources(void); 52 | 53 | signals: 54 | void okClicked(const QString& fullNameJson); 55 | void cancelClicked(void); 56 | void closeClicked(void); 57 | 58 | protected: 59 | virtual void closeEvent(QCloseEvent *event); 60 | 61 | private slots: 62 | void handleJsonFileSelectedToProcess(const QString& fullNameJson); 63 | void handleOkAndAccept(void); 64 | void handleCancel(void); 65 | 66 | private: 67 | MaterialBrowserWidget* mResourceWidget; 68 | }; 69 | 70 | #endif 71 | 72 | -------------------------------------------------------------------------------- /source/header/paint_dockwidget.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef PAINT_DOCKWIDGET_H 22 | #define PAINT_DOCKWIDGET_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | QT_BEGIN_NAMESPACE 29 | QT_END_NAMESPACE 30 | 31 | class MainWindow; 32 | 33 | /**************************************************************************** 34 | This class represents a DockWidget 35 | It is the container dockwidget of the PaintLayerDockWidget and the 36 | BrushPresetDockWidget 37 | ***************************************************************************/ 38 | class PaintDockWidget : public QDockWidget 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | PaintDockWidget(QString title, MainWindow* parent, Qt::WindowFlags flags = 0); 44 | ~PaintDockWidget(void); 45 | void addDockWidget(Qt::DockWidgetArea area, QDockWidget* dockWidget); 46 | 47 | private slots: 48 | 49 | private: 50 | MainWindow* mParent; 51 | QMainWindow* mInnerMain; 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /source/header/preset_widget.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef PRESET_WIDGET_H 22 | #define PRESET_WIDGET_H 23 | 24 | #include 25 | #include "tool_default_texturewidget.h" 26 | 27 | QT_BEGIN_NAMESPACE 28 | 29 | QT_END_NAMESPACE 30 | 31 | class BrushPresetDockWidget; 32 | 33 | /**************************************************************************** 34 | Main class for preset widget. This widgets displays presets. 35 | ***************************************************************************/ 36 | class PresetWidget : public QWidget 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | PresetWidget(const QString& presetDir, BrushPresetDockWidget* brushPresetDockWidget, QWidget* parent = 0); 42 | ~PresetWidget(void); 43 | 44 | // Add a thumb to the widget 45 | void addPreset (const QString& path, const QString& thumbName); 46 | 47 | signals: 48 | void presetCreateMaterial (const QString& name, const QString& baseName); 49 | void presetCreateMaterialAndApply (const QString& name, const QString& baseName); 50 | 51 | private slots: 52 | void handlePresetDoubleClicked(const QString& name, const QString& baseName); 53 | void handleContextMenuSelected (QAction* action, const QString& name, const QString& baseName); 54 | 55 | protected: 56 | void loadPresets(const QString& searchPath); 57 | 58 | private: 59 | BrushPresetDockWidget* mBrushPresetDockWidget; // Reference to the dockwidget that contains this widget 60 | Magus::QtDefaultTextureWidget* mTextureWidget; 61 | QWidget* mParent; 62 | QString mPresetDir; 63 | }; 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /source/header/recent_file_action.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #ifndef __RECENT_FILE_ACTION_H__ 22 | #define __RECENT_FILE_ACTION_H__ 23 | 24 | #include 25 | 26 | QT_BEGIN_NAMESPACE 27 | 28 | QT_END_NAMESPACE 29 | 30 | class RecentFileAction : public QAction 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | QString mFileName; 36 | 37 | // Constructor 38 | RecentFileAction (const QString& fileName, QObject* parent); 39 | 40 | // Destructor 41 | virtual ~RecentFileAction (void); 42 | 43 | signals: 44 | void recentFileActionTriggered (const QString& fileName); 45 | 46 | private slots: 47 | void interceptTriggered (bool checked); 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /source/src/central_dockwidget.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include "constants.h" 23 | #include "mainwindow.h" 24 | #include "central_dockwidget.h" 25 | 26 | //****************************************************************************/ 27 | CentralDockWidget::CentralDockWidget(QString title, MainWindow* parent, Qt::WindowFlags flags) : 28 | QDockWidget (title, parent, flags), 29 | mParent(parent) 30 | { 31 | mInnerMain = new QMainWindow(); 32 | mInnerMain->setMinimumSize(100,100); 33 | setWidget(mInnerMain); 34 | } 35 | 36 | //****************************************************************************/ 37 | CentralDockWidget::~CentralDockWidget(void) 38 | { 39 | } 40 | 41 | //****************************************************************************/ 42 | void CentralDockWidget::addDockWidget(Qt::DockWidgetArea area, QDockWidget* dockWidget) 43 | { 44 | mInnerMain->addDockWidget(area, dockWidget); 45 | } 46 | -------------------------------------------------------------------------------- /source/src/hlms_editor_plugin_action.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include "hlms_editor_plugin_action.h" 23 | 24 | //****************************************************************************/ 25 | PluginAction::PluginAction(Ogre::HlmsEditorPlugin* plugin, const QString& text, QObject* parent) : 26 | QAction(text, parent) 27 | { 28 | mHlmsEditorPlugin = plugin; 29 | connect(this, SIGNAL(triggered(bool)), this, SLOT(interceptTriggered(bool))); 30 | } 31 | 32 | //****************************************************************************/ 33 | PluginAction::~PluginAction(void) 34 | { 35 | } 36 | 37 | //****************************************************************************/ 38 | void PluginAction::interceptTriggered (bool checked) 39 | { 40 | emit pluginActionTriggered (mHlmsEditorPlugin); 41 | } 42 | -------------------------------------------------------------------------------- /source/src/hlms_node_blenddblock.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include "constants.h" 23 | #include "hlms_node_blenddblock.h" 24 | #include "hlms_node_porttypes.h" 25 | 26 | //****************************************************************************/ 27 | HlmsNodeBlendblock::HlmsNodeBlendblock(QString title, QGraphicsItem* parent) : 28 | QtNode(title, parent), 29 | mBlendblockEnabled (true), 30 | mAlphaToCoverageEnabled (false), 31 | mBlendChannelMask (4), 32 | mTransparent (false), 33 | mSeparateBlend (false), 34 | mSourceBlendFactor (0), 35 | mDestBlendFactor (1), 36 | mSourceBlendFactorAlpha (0), 37 | mDestBlendFactorAlpha (1), 38 | mBlendOperation (0), 39 | mBlendOperationAlpha (0) 40 | { 41 | // Define the connection policy 42 | HlmsPbsDatablockBlendblockPortType hlmsPbsDatablockBlendblockPortType; 43 | HlmsBlendblockDatablockPortType hlmsBlendblockDatablockPortType; 44 | hlmsPbsDatablockBlendblockPortType.addPortTypeToConnectionPolicy(hlmsBlendblockDatablockPortType); 45 | 46 | // Custome node settings 47 | setTitleColor(Qt::white); 48 | setHeaderTitleIcon(ICON_BLENDBLOCK); 49 | setAction1Icon(ICON_MINMAX); 50 | setAction2Icon(ICON_CLOSE); 51 | alignTitle(Magus::ALIGNED_LEFT); 52 | setHeaderColor(QColor("#C74E4C")); 53 | createPort(PORT_ID_BLENDBLOCK, 54 | PORT_DATABLOCK, 55 | hlmsPbsDatablockBlendblockPortType, 56 | QColor("#C74E4C"), 57 | Magus::PORT_SHAPE_CIRCLE, 58 | Magus::ALIGNED_LEFT, 59 | QColor("#C74E4C")); 60 | 61 | setPortNameColor(Qt::white); 62 | setZoom(0.9); 63 | } 64 | 65 | //****************************************************************************/ 66 | HlmsNodeBlendblock::~HlmsNodeBlendblock(void) 67 | { 68 | } 69 | 70 | 71 | -------------------------------------------------------------------------------- /source/src/hlms_node_macroblock.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include "constants.h" 23 | #include "hlms_node_macroblock.h" 24 | #include "hlms_node_porttypes.h" 25 | 26 | //****************************************************************************/ 27 | HlmsNodeMacroblock::HlmsNodeMacroblock(QString title, QGraphicsItem* parent) : 28 | Magus::QtNode(title, parent), 29 | mMacroblockEnabled(true), 30 | mScissorTestEnabled(false), 31 | mDepthCheck(true), 32 | mDepthWrite(true), 33 | mDepthFunc(3), 34 | mDepthBiasConstant(0.0f), 35 | mDepthBiasSlopeScale(0.0f), 36 | mCullMode(1), 37 | mPolygonMode(2) 38 | { 39 | // Define the connection policy 40 | HlmsPbsDatablockMacroblockPortType hlmsPbsDatablockMacroblockPortType; 41 | HlmsMacroblockDatablockPortType hlmsMacroblockDatablockPortType; 42 | hlmsPbsDatablockMacroblockPortType.addPortTypeToConnectionPolicy(hlmsMacroblockDatablockPortType); 43 | 44 | // Custome node settings 45 | setTitleColor(Qt::white); 46 | setHeaderTitleIcon(ICON_MACROBLOCK); 47 | setAction1Icon(ICON_MINMAX); 48 | setAction2Icon(ICON_CLOSE); 49 | alignTitle(Magus::ALIGNED_LEFT); 50 | setHeaderColor(QColor("#5D964E")); 51 | createPort(PORT_ID_MACROBLOCK, 52 | PORT_DATABLOCK, 53 | hlmsPbsDatablockMacroblockPortType, 54 | QColor("#5D964E"), 55 | Magus::PORT_SHAPE_CIRCLE, 56 | Magus::ALIGNED_LEFT, 57 | QColor("#5D964E")); 58 | 59 | setPortNameColor(Qt::white); 60 | setZoom(0.9); 61 | } 62 | 63 | //****************************************************************************/ 64 | HlmsNodeMacroblock::~HlmsNodeMacroblock(void) 65 | { 66 | } 67 | 68 | -------------------------------------------------------------------------------- /source/src/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | #include 22 | #include 23 | #include "mainwindow.h" 24 | 25 | int main(int argc, char *argv[]) 26 | { 27 | #ifdef _WIN32 28 | /*Help Qt find the "./platforms/qwindows.dll" library a little bit, by making it look next to the executable first. 29 | * 30 | *From Qt documentation : 31 | * 32 | * The default path list consists of a single entry, 33 | * the installation directory for plugins. The default 34 | * installation directory for plugins is INSTALL/plugins, 35 | * where INSTALL is the directory where Qt was installed. 36 | */ 37 | QCoreApplication::addLibraryPath("."); 38 | #endif 39 | QApplication app(argc, argv); 40 | MainWindow mainWin; 41 | mainWin.show(); 42 | while (!mainWin.mIsClosing) 43 | { 44 | app.processEvents(); 45 | mainWin.update(); 46 | QThread::msleep(10); 47 | } 48 | return 0; 49 | } -------------------------------------------------------------------------------- /source/src/paint_dockwidget.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include "constants.h" 23 | #include "mainwindow.h" 24 | #include "paint_dockwidget.h" 25 | 26 | class MainWindow; 27 | 28 | //****************************************************************************/ 29 | PaintDockWidget::PaintDockWidget(QString title, MainWindow* parent, Qt::WindowFlags flags) : 30 | QDockWidget (title, parent, flags), 31 | mParent(parent) 32 | { 33 | mInnerMain = new QMainWindow(); 34 | mInnerMain->setMinimumSize(100,100); 35 | setWidget(mInnerMain); 36 | QRect rec = QApplication::desktop()->screenGeometry(); 37 | setMinimumWidth(0.1 * rec.width()); 38 | } 39 | 40 | //****************************************************************************/ 41 | PaintDockWidget::~PaintDockWidget(void) 42 | { 43 | } 44 | 45 | //****************************************************************************/ 46 | void PaintDockWidget::addDockWidget(Qt::DockWidgetArea area, QDockWidget* dockWidget) 47 | { 48 | mInnerMain->addDockWidget(area, dockWidget); 49 | } 50 | -------------------------------------------------------------------------------- /source/src/recent_file_action.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 - 2017 4 | ** 5 | ** This file is generated by the Magus toolkit 6 | ** 7 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 8 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 9 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 10 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 11 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 12 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 13 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 14 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 15 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 16 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 17 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 18 | ** 19 | ****************************************************************************/ 20 | 21 | // Include 22 | #include "recent_file_action.h" 23 | 24 | //****************************************************************************/ 25 | RecentFileAction::RecentFileAction(const QString& fileName, QObject* parent) : 26 | QAction(fileName, parent) 27 | { 28 | mFileName = fileName; 29 | connect(this, SIGNAL(triggered(bool)), this, SLOT(interceptTriggered(bool))); 30 | } 31 | 32 | //****************************************************************************/ 33 | RecentFileAction::~RecentFileAction(void) 34 | { 35 | } 36 | 37 | //****************************************************************************/ 38 | void RecentFileAction::interceptTriggered (bool checked) 39 | { 40 | emit recentFileActionTriggered (mFileName); 41 | } 42 | -------------------------------------------------------------------------------- /temp/README.md: -------------------------------------------------------------------------------- 1 | # HLMS Editor 2 | 3 | This is a temp dir used for saving temporary image (texture) files --------------------------------------------------------------------------------