Compare commits

...

69 Commits

Author SHA1 Message Date
karlis 1031ba5808 实现另存为和打开的路径选取 2023-03-07 19:36:07 +08:00
karlis 33475f6f57 实现保存流程 2023-03-07 17:56:18 +08:00
karlis 8ca036fafb 一系列修改 2023-03-07 17:06:26 +08:00
karlis c1ad6a61f0 添加了序列化的接口和基本实现 2023-03-06 19:43:01 +08:00
wuyize 6188d6a413 加入qt-material-widgets控件库 2023-03-06 12:38:25 +08:00
wuyize 4c623dd5b3 重构了Painting等 2023-03-03 20:51:01 +08:00
karlis 50bc51a8a6 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-28 16:48:48 +08:00
karlis 9028ecdca0 添加了删除功能(请先删除引用后删除实例) 2023-02-28 16:48:41 +08:00
wuyize 723c0a9760 优化虚拟纹理加载 2023-02-26 13:57:53 +08:00
wuyize f798ea410d 解决了处理svg平移的问题 2023-02-25 19:38:35 +08:00
yang.yongquan de0f8f6009 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-25 17:08:50 +08:00
yang.yongquan 4d9fe01fe9 修改了ShortCutTree部分的线部分索引 2023-02-25 17:08:45 +08:00
wuyize a4a1b2984e 修改painitng.comp以适应编码修改 2023-02-25 17:00:38 +08:00
wuyize 28c30a6172 Merge branch 'dev-VirtualTexture' 2023-02-25 16:40:35 +08:00
wuyize 8920dc39ad 实现虚拟纹理的异步加载 2023-02-25 13:34:24 +08:00
yang.yongquan b2803f777a Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-25 10:47:33 +08:00
yang.yongquan ab391ed0ec 增加分割点在原线的比例关系与Svg处理变换问题 2023-02-25 10:47:27 +08:00
karlis 28ea0dd394 窗口缩放 2023-02-24 20:07:56 +08:00
karlis ab402955cd 添加了修改 2023-02-23 22:57:01 +08:00
wuyize b23d55e876 初步完成page的按需加载卸载 2023-02-23 22:18:52 +08:00
karlis abe1ee02c1 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-23 22:13:32 +08:00
wuyize 063be364c2 采样最接近的可用mipmap 2023-02-22 12:49:46 +08:00
wuyize 6a02f68514 Merge branch 'main' into dev-VirtualTexture 2023-02-21 20:15:19 +08:00
wuyize 57b537b66b 初步改用虚拟纹理 2023-02-21 20:13:07 +08:00
wuyize ff848b1443 qDebug等输出显示来源 2023-02-20 22:26:29 +08:00
wuyize f0ab4115c3 Merge branch 'dev-VirtualTexture' 2023-02-20 22:10:22 +08:00
karlis 21a973babd 添加InfoDisplay窗口自我刷新 2023-02-20 20:09:00 +08:00
karlis fef7668351 style dialog 2023-02-20 13:48:39 +08:00
wuyize 3221d18563 重构了Model和Mesh等,RendererGLWidget改用glad 2023-02-18 13:19:21 +08:00
wuyize 41080b1c1e 修改了项目配置 2023-02-15 17:50:02 +08:00
wuyize dfd9ef38e4 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-15 15:38:04 +08:00
wuyize 3fe7bab969 实现线的平头样式 2023-02-15 15:37:30 +08:00
karlis 883fac3211 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-14 21:34:12 +08:00
karlis 7d0ca047c1 添加了右侧栏的StyleList样例 2023-02-14 21:33:57 +08:00
yang.yongquan 315083cd52 增加了QPainterPath的单调化 2023-02-14 18:10:08 +08:00
wuyize ef88c4a39e 修复了计算BrdfLut的错误 2023-02-13 23:14:45 +08:00
wuyize 2a78bb4be8 实现IBL 2023-02-13 17:12:04 +08:00
wuyize f3559d133d 加入天空盒 2023-02-12 12:16:33 +08:00
wuyize d15e3baa69 调整了项目结构 2023-02-11 16:16:37 +08:00
wuyize 05fa4194b8 修改了LayerStyle 2023-02-11 12:43:52 +08:00
yang.yongquan e03afb85ce 修复了一些Bug 2023-02-11 10:10:07 +08:00
wuyize 0004db2aa2 显示bvh 2023-02-10 18:39:55 +08:00
yang.yongquan ad3fe46efe 修改了一些bug 2023-02-10 18:28:59 +08:00
yang.yongquan 39aa4a5902 修改了一些bug 2023-02-10 17:44:09 +08:00
wuyize 23f14cb764 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-10 14:57:00 +08:00
wuyize 1905b66179 实现线的径向渐变\分层样式 2023-02-10 13:48:30 +08:00
yang.yongquan e1dc0e4065 添加BvhTree功能(旋转后包围盒) 2023-02-09 23:30:00 +08:00
wuyize a13c562885 解决每次修改都重新编译整个项目的问题 2023-02-08 21:05:07 +08:00
wuyize e004809164 GraphicElement改为使用QImage 2023-02-08 18:33:26 +08:00
wuyize 16bfba76e4 Merge branch 'main' of http://101.34.228.45:3000/BigC/ArchitectureColoredPainting 2023-02-08 16:35:15 +08:00
wuyize ed3f3fc74a 添加ElementRenderer的单元测试 2023-02-08 16:34:16 +08:00
karlis 870531a0be 用PixelPath更换了QPainterPath,一系列更改 2023-02-08 15:38:12 +08:00
wuyize b562ff5053 添加单元测试 2023-02-07 20:50:31 +08:00
ArgonarioD 55f37fd284 FIX:程序无法运行的问题 2023-02-07 16:14:56 +08:00
ArgonarioD 169aa9501c Merge branch 'main' into dev-sys 2023-02-07 16:05:33 +08:00
ArgonarioD 52e266cef0 为新的头文件添加了空实现 2023-02-07 16:05:24 +08:00
ArgonarioD 2d44fd4d9f 为新的QImage渲染方式修改了头文件
修改了GraphicElement、LayerWrapper
2023-02-07 15:57:59 +08:00
wuyize 099b957bf7 解决筛选器的合并错误 2023-02-06 19:25:59 +08:00
wuyize e8ba774370 merge 2023-02-06 18:13:00 +08:00
wuyize 994c711e34 初步实现图元绘制到QImage的接口 2023-02-06 18:09:48 +08:00
yang.yongquan 2af2464745 增加了QPainterPath转为vector<> 2023-02-04 20:20:40 +08:00
yang.yongquan 9e1ec3f848 merge 2023-02-02 17:06:32 +08:00
yang.yongquan e6ff316d0e 修改了项目结构 2023-02-02 17:04:34 +08:00
wuyize e5a22bd02a 基本确定Style的结构,修复了编译FramelessHelper时的一些警告 2023-02-01 22:46:30 +08:00
wuyize 2f1e1a0e53 Fixed: 读取svg时传入绝对路径 2023-01-28 11:20:54 +08:00
wuyize cd809e896f Merge remote-tracking branch 'origin/main' 2023-01-27 17:40:12 +08:00
wuyize 6d104faf53 实现线的单侧描边 2023-01-27 17:36:45 +08:00
yang.yongquan da2cda55e5 添加注释 2023-01-23 23:16:44 +08:00
wuyize 4f9720ba89 将QGoodWindow换成FramelessHelper 2023-01-22 11:04:22 +08:00
1922 changed files with 85615 additions and 8753 deletions

3
.gitignore vendored
View File

@ -360,4 +360,5 @@ MigrationBackup/
.ionide/ .ionide/
# Fody - auto-generated XML schema # Fody - auto-generated XML schema
FodyWeavers.xsd FodyWeavers.xsd
/UnitTest/Qt.x64.runsettings

View File

@ -4,26 +4,76 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 17.2.32519.379 VisualStudioVersion = 17.2.32519.379
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArchitectureColoredPainting", "ArchitectureColoredPainting\ArchitectureColoredPainting.vcxproj", "{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArchitectureColoredPainting", "ArchitectureColoredPainting\ArchitectureColoredPainting.vcxproj", "{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FramelessHelperCore", "FramelessHelper\qmake\FramelessHelperCore\FramelessHelperCore.vcxproj", "{954D3D24-DF86-33A3-8867-D1735CCBDB10}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FramelessHelperWidgets", "FramelessHelper\qmake\FramelessHelperWidgets\FramelessHelperWidgets.vcxproj", "{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTest", "UnitTest\UnitTest.vcxproj", "{C81742B7-2428-4329-BEA8-01E4B985810A}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{B982E745-C0B1-46B3-A27B-743AF105F2D0} = {B982E745-C0B1-46B3-A27B-743AF105F2D0} {3FE96A33-2BB7-4686-A710-3EB8E3BBD709} = {3FE96A33-2BB7-4686-A710-3EB8E3BBD709}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QGoodWindow", "QGoodWindow\QGoodWindow.vcxproj", "{B982E745-C0B1-46B3-A27B-743AF105F2D0}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "components", "qt-material-widgets\components\components.vcxproj", "{8F360763-A045-3808-87A9-3FAE38E69819}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples", "qt-material-widgets\examples\examples.vcxproj", "{2CF18346-77C1-3A0A-B9ED-8B38C828491B}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64 Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64 Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Debug|x64.ActiveCfg = Debug|x64 {3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Debug|x64.ActiveCfg = Debug|x64
{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Debug|x64.Build.0 = Debug|x64 {3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Debug|x64.Build.0 = Debug|x64
{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Debug|x86.ActiveCfg = Debug|x64
{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Debug|x86.Build.0 = Debug|x64
{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Release|x64.ActiveCfg = Release|x64 {3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Release|x64.ActiveCfg = Release|x64
{3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Release|x64.Build.0 = Release|x64 {3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Release|x64.Build.0 = Release|x64
{B982E745-C0B1-46B3-A27B-743AF105F2D0}.Debug|x64.ActiveCfg = Debug|x64 {3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Release|x86.ActiveCfg = Release|x64
{B982E745-C0B1-46B3-A27B-743AF105F2D0}.Debug|x64.Build.0 = Debug|x64 {3FE96A33-2BB7-4686-A710-3EB8E3BBD709}.Release|x86.Build.0 = Release|x64
{B982E745-C0B1-46B3-A27B-743AF105F2D0}.Release|x64.ActiveCfg = Release|x64 {954D3D24-DF86-33A3-8867-D1735CCBDB10}.Debug|x64.ActiveCfg = Debug|x64
{B982E745-C0B1-46B3-A27B-743AF105F2D0}.Release|x64.Build.0 = Release|x64 {954D3D24-DF86-33A3-8867-D1735CCBDB10}.Debug|x64.Build.0 = Debug|x64
{954D3D24-DF86-33A3-8867-D1735CCBDB10}.Debug|x86.ActiveCfg = Debug|x64
{954D3D24-DF86-33A3-8867-D1735CCBDB10}.Debug|x86.Build.0 = Debug|x64
{954D3D24-DF86-33A3-8867-D1735CCBDB10}.Release|x64.ActiveCfg = Release|x64
{954D3D24-DF86-33A3-8867-D1735CCBDB10}.Release|x64.Build.0 = Release|x64
{954D3D24-DF86-33A3-8867-D1735CCBDB10}.Release|x86.ActiveCfg = Release|x64
{954D3D24-DF86-33A3-8867-D1735CCBDB10}.Release|x86.Build.0 = Release|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Debug|x64.ActiveCfg = Debug|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Debug|x64.Build.0 = Debug|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Debug|x86.ActiveCfg = Debug|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Debug|x86.Build.0 = Debug|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Release|x64.ActiveCfg = Release|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Release|x64.Build.0 = Release|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Release|x86.ActiveCfg = Release|x64
{E7A71E05-4AA5-31DB-A17D-542FC7BD83A3}.Release|x86.Build.0 = Release|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Debug|x64.ActiveCfg = Debug|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Debug|x64.Build.0 = Debug|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Debug|x86.ActiveCfg = Debug|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Debug|x86.Build.0 = Debug|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Release|x64.ActiveCfg = Release|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Release|x64.Build.0 = Release|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Release|x86.ActiveCfg = Release|x64
{C81742B7-2428-4329-BEA8-01E4B985810A}.Release|x86.Build.0 = Release|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Debug|x64.ActiveCfg = Debug|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Debug|x64.Build.0 = Debug|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Debug|x86.ActiveCfg = Debug|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Debug|x86.Build.0 = Debug|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Release|x64.ActiveCfg = Release|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Release|x64.Build.0 = Release|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Release|x86.ActiveCfg = Release|x64
{8F360763-A045-3808-87A9-3FAE38E69819}.Release|x86.Build.0 = Release|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Debug|x64.ActiveCfg = Debug|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Debug|x64.Build.0 = Debug|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Debug|x86.ActiveCfg = Debug|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Debug|x86.Build.0 = Debug|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Release|x64.ActiveCfg = Release|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Release|x64.Build.0 = Release|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Release|x86.ActiveCfg = Release|x64
{2CF18346-77C1-3A0A-B9ED-8B38C828491B}.Release|x86.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -32,7 +32,7 @@
</ImportGroup> </ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
<QtInstall>5.15.2_msvc2019_64</QtInstall> <QtInstall>5.15.2_msvc2019_64</QtInstall>
<QtModules>core;xml;gui;svg;widgets;winextras</QtModules> <QtModules>core;xml;gui;svg;widgets;core-private;gui-private;widgets-private</QtModules>
<QtBuildConfig>debug</QtBuildConfig> <QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
@ -55,7 +55,7 @@
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<IncludePath>$(SolutionDir)include;$(IncludePath)</IncludePath> <IncludePath>$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
</PropertyGroup> </PropertyGroup>
@ -67,16 +67,22 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<LanguageStandard>stdcpp17</LanguageStandard> <LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalIncludeDirectories>$(SolutionDir)ArchitectureColoredPainting\src\Editor\RightBar;$(SolutionDir)ArchitectureColoredPainting\src\Editor\;$(SolutionDir)QGoodWindow;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir)include;$(SolutionDir)ArchitectureColoredPainting\src\Editor\RightBar;$(SolutionDir)ArchitectureColoredPainting\src\Editor\;$(SolutionDir)FramelessHelper\include;$(SolutionDir)FramelessHelper\qmake\inc\core;$(SolutionDir)FramelessHelper\include\FramelessHelper\Core;$(SolutionDir)qt-material-widgets\components;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>FRAMELESSHELPER_WIDGETS_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level1</WarningLevel>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
</ClCompile> </ClCompile>
<Link>
<AdditionalDependencies>opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
<ClCompile> <ClCompile>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType> <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization> <Optimization>MaxSpeed</Optimization>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
@ -98,116 +104,144 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\CaptionButton.cpp" />
<ClCompile Include="src\Editor\EditorWidget.cpp" /> <ClCompile Include="src\Editor\EditorWidget.cpp" />
<ClCompile Include="src\CaptionButton.cpp" />
<ClCompile Include="src\Editor\EditorWidgetItem.cpp" />
<ClCompile Include="src\Editor\ElementManager.cpp" /> <ClCompile Include="src\Editor\ElementManager.cpp" />
<ClCompile Include="src\Editor\GraphicElement.cpp" /> <ClCompile Include="src\Editor\GraphicElement.cpp" />
<ClCompile Include="src\Editor\LayerManager.cpp" /> <ClCompile Include="src\Editor\LayerManager.cpp" />
<ClCompile Include="src\Editor\LayerStyle.cpp" />
<ClCompile Include="src\Editor\LayerWrapper.cpp" /> <ClCompile Include="src\Editor\LayerWrapper.cpp" />
<ClCompile Include="src\Editor\PixelPath.cpp" />
<ClCompile Include="src\Editor\PreviewWindow.cpp" /> <ClCompile Include="src\Editor\PreviewWindow.cpp" />
<ClCompile Include="src\Editor\RightBar\InfoDisplayWidget.cpp" /> <ClCompile Include="src\Editor\RightBar\InfoDisplayWidget.cpp" />
<ClCompile Include="src\Editor\RightBar\LayerTreeWidget.cpp" /> <ClCompile Include="src\Editor\RightBar\LayerTreeWidget.cpp" />
<ClCompile Include="src\Editor\third-party modules\qquick\qquicksvgparser.cpp" /> <ClCompile Include="src\Editor\ThirdPartyLib\qquick\qquicksvgparser.cpp" />
<ClCompile Include="src\Editor\third-party modules\util\SvgFileLoader.cpp" /> <ClCompile Include="src\Editor\ThirdPartyLib\SvgHelper.cpp" />
<ClCompile Include="src\Editor\util\PainterPathUtil.cpp" />
<ClCompile Include="src\Editor\util\SvgFileLoader.cpp" />
<ClCompile Include="src\gl.c" />
<ClCompile Include="src\IconWidget.cpp" /> <ClCompile Include="src\IconWidget.cpp" />
<ClCompile Include="src\main.cpp" /> <ClCompile Include="src\main.cpp" />
<ClCompile Include="src\MainWindow.cpp" /> <ClCompile Include="src\MainWindow.cpp" />
<ClCompile Include="src\NavigationBarWidget.cpp" /> <ClCompile Include="src\NavigationBarWidget.cpp" />
<ClCompile Include="src\Renderer\IblUtils.cpp" />
<ClCompile Include="src\Renderer\Painting\BaseStyle.cpp" />
<ClCompile Include="src\Renderer\Painting\BvhTree.cpp" /> <ClCompile Include="src\Renderer\Painting\BvhTree.cpp" />
<ClCompile Include="src\Renderer\Camera.cpp" /> <ClCompile Include="src\Renderer\Camera.cpp" />
<ClCompile Include="src\Renderer\Painting\CubicBezier.cpp" /> <ClCompile Include="src\Renderer\Painting\CubicBezier.cpp" />
<ClCompile Include="src\Renderer\Painting\CubicBezierSignedDistance.cpp" /> <ClCompile Include="src\Renderer\Painting\CubicBezierSignedDistance.cpp" />
<ClCompile Include="src\Renderer\Painting\CubicMonotonization.cpp" />
<ClCompile Include="src\Renderer\Light.cpp" /> <ClCompile Include="src\Renderer\Light.cpp" />
<ClCompile Include="src\Renderer\Painting\Element.cpp" /> <ClCompile Include="src\Renderer\Painting\Element.cpp" />
<ClCompile Include="src\Renderer\Painting\ElementStyle.cpp" /> <ClCompile Include="src\Renderer\Painting\ElementStyle.cpp" />
<ClCompile Include="src\Renderer\Painting\MaterialStyleFill.cpp" />
<ClCompile Include="src\Renderer\Painting\Line.cpp" /> <ClCompile Include="src\Renderer\Painting\Line.cpp" />
<ClCompile Include="src\Renderer\Mesh.cpp" /> <ClCompile Include="src\Renderer\Mesh.cpp" />
<ClCompile Include="src\Renderer\Model.cpp" /> <ClCompile Include="src\Renderer\Model.cpp" />
<ClCompile Include="src\Renderer\Painting\LineTree.cpp" /> <ClCompile Include="src\Renderer\Painting\LineTree.cpp" />
<ClCompile Include="src\Renderer\Painting\MaterialStyleStroke.cpp" />
<ClCompile Include="src\Renderer\Painting\Painting.cpp" /> <ClCompile Include="src\Renderer\Painting\Painting.cpp" />
<ClCompile Include="src\Renderer\Painting\PaintingHelper.cpp" />
<ClCompile Include="src\Renderer\PaintingMesh.cpp" /> <ClCompile Include="src\Renderer\PaintingMesh.cpp" />
<ClCompile Include="src\Renderer\Preview\ElementRenderer.cpp" />
<ClCompile Include="src\Renderer\RendererGLWidget.cpp" /> <ClCompile Include="src\Renderer\RendererGLWidget.cpp" />
<ClCompile Include="src\Renderer\RendererWidget.cpp" /> <ClCompile Include="src\Renderer\RendererWidget.cpp" />
<ClCompile Include="src\Renderer\Painting\ShortCutTree.cpp" /> <ClCompile Include="src\Renderer\Painting\ShortCutTree.cpp" />
<ClCompile Include="src\Renderer\Painting\StraightLine.cpp" /> <ClCompile Include="src\Renderer\Painting\StraightLine.cpp" />
<ClCompile Include="src\Renderer\VirtualTextureManager.cpp" />
<ClCompile Include="src\SvgParser.cpp" /> <ClCompile Include="src\SvgParser.cpp" />
<ClCompile Include="src\TitleWidget.cpp" /> <ClCompile Include="src\TitleWidget.cpp" />
<ClCompile Include="src\Editor\third-party modules\SvgHelper.cpp" /> <QtUic Include="EditorWidgetItem.ui" />
<QtRcc Include="MainWindow.qrc" />
<QtUic Include="EditorWidget.ui" />
<QtUic Include="FramelessWindow.ui" /> <QtUic Include="FramelessWindow.ui" />
<QtUic Include="MainWindow.ui" /> <QtUic Include="MainWindow.ui" />
<QtUic Include="NavigationBarWidget.ui" /> <QtUic Include="NavigationBarWidget.ui" />
<QtUic Include="RendererWidget.ui" /> <QtUic Include="RendererWidget.ui" />
<QtUic Include="EditorWidget.ui" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\data.json" /> <None Include="..\data.json" />
<None Include="darkstyle.qss" /> <None Include="res\Shaders\brdf_lut.comp" />
<None Include="lightstyle.qss" /> <None Include="res\Shaders\cubemap.frag" />
<None Include="Shaders\depth_init.comp" /> <None Include="res\Shaders\cubemap.vert" />
<None Include="Shaders\depth_mipmap.comp" /> <None Include="res\Shaders\cubemap_prefilter.frag" />
<None Include="Shaders\final.frag" /> <None Include="res\Shaders\depth_init.comp" />
<None Include="Shaders\final.vert" /> <None Include="res\Shaders\depth_mipmap.comp" />
<None Include="Shaders\model.frag" /> <None Include="res\Shaders\element.comp" />
<None Include="Shaders\model.vert" /> <None Include="res\Shaders\final.frag" />
<None Include="Shaders\model_shadow.frag" /> <None Include="res\Shaders\final.vert" />
<None Include="Shaders\model_shadow.geom" /> <None Include="res\Shaders\irradiance_convolution.frag" />
<None Include="Shaders\model_shadow.vert" /> <None Include="res\Shaders\model.frag" />
<None Include="Shaders\painting.comp" /> <None Include="res\Shaders\model.vert" />
<None Include="Shaders\painting.frag" /> <None Include="res\Shaders\model_shadow.frag" />
<None Include="Shaders\painting.vert" /> <None Include="res\Shaders\model_shadow.geom" />
<None Include="Shaders\shader.frag" /> <None Include="res\Shaders\model_shadow.vert" />
<None Include="Shaders\shader.vert" /> <None Include="res\Shaders\pageId_downsample.comp" />
<None Include="Shaders\shadow_mapping.comp" /> <None Include="res\Shaders\painting.comp" />
<None Include="Shaders\ssgi.comp" /> <None Include="res\Shaders\painting.frag" />
<None Include="res\Shaders\painting.vert" />
<None Include="res\Shaders\shader.frag" />
<None Include="res\Shaders\shader.vert" />
<None Include="res\Shaders\shadow_mapping.comp" />
<None Include="res\Shaders\skybox.frag" />
<None Include="res\Shaders\skybox.vert" />
<None Include="res\Shaders\ssgi.comp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtMoc Include="src\Editor\RightBar\LayerTreeWidget.h" /> <QtMoc Include="src\Editor\RightBar\LayerTreeWidget.h" />
<QtMoc Include="src\Editor\RightBar\InfoDisplayWidget.h" /> <QtMoc Include="src\Editor\RightBar\InfoDisplayWidget.h" />
<ClInclude Include="src\Editor\third-party modules\qquick\qtquickglobal.h" />
<ClInclude Include="src\Editor\third-party modules\qquick\qtquickglobal_p.h" />
<ClInclude Include="src\Editor\third-party modules\qquick\qquicksvgparser_p.h" />
<ClInclude Include="src\Editor\third-party modules\SvgHelper.h" />
<QtMoc Include="src\MainWindow.h" /> <QtMoc Include="src\MainWindow.h" />
<QtMoc Include="src\Editor\EditorWidget.h" />
<ClInclude Include="src\Editor\ElementManager.h" /> <ClInclude Include="src\Editor\ElementManager.h" />
<ClInclude Include="src\Editor\GraphicElement.h" /> <ClInclude Include="src\Editor\GraphicElement.h" />
<ClInclude Include="src\Editor\LayerManager.h" /> <ClInclude Include="src\Editor\LayerManager.h" />
<ClInclude Include="src\Editor\LayerStyle.h" /> <ClInclude Include="src\Editor\LayerStyle.h" />
<ClInclude Include="src\Editor\LayerWrapper.h" />
<QtMoc Include="src\Editor\PreviewWindow.h" /> <QtMoc Include="src\Editor\PreviewWindow.h" />
<ClInclude Include="src\Editor\third-party modules\util\SvgFileLoader.h" /> <ClInclude Include="src\Editor\PixelPath.h" />
<ClInclude Include="src\Editor\ThirdPartyLib\qquick\qquicksvgparser_p.h" />
<ClInclude Include="src\Editor\ThirdPartyLib\qquick\qtquickglobal.h" />
<ClInclude Include="src\Editor\ThirdPartyLib\qquick\qtquickglobal_p.h" />
<ClInclude Include="src\Editor\ThirdPartyLib\SvgHelper.h" />
<ClInclude Include="src\Editor\util\PainterPathUtil.h" />
<ClInclude Include="src\Editor\util\SvgFileLoader.h" />
<ClInclude Include="src\Renderer\IblUtils.h" />
<ClInclude Include="src\Renderer\Painting\BaseStyle.h" />
<ClInclude Include="src\Renderer\Painting\CubicBezierSignedDistance.h" /> <ClInclude Include="src\Renderer\Painting\CubicBezierSignedDistance.h" />
<ClInclude Include="src\Renderer\Painting\Element.h" /> <ClInclude Include="src\Renderer\Painting\Element.h" />
<ClInclude Include="src\Renderer\Painting\ElementStyle.h" /> <ClInclude Include="src\Renderer\Painting\ElementStyle.h" />
<ClInclude Include="src\Renderer\Painting\MaterialStyleFill.h" />
<ClInclude Include="src\Renderer\Painting\LineTree.h" /> <ClInclude Include="src\Renderer\Painting\LineTree.h" />
<ClInclude Include="src\Renderer\Painting\MaterialStyleStroke.h" />
<ClInclude Include="src\Renderer\Painting\Painting.h" /> <ClInclude Include="src\Renderer\Painting\Painting.h" />
<ClInclude Include="src\Renderer\Preview\ElementRenderer.h" />
<ClInclude Include="src\Renderer\VirtualTextureManager.h" />
<ClInclude Include="src\SvgParser.h" /> <ClInclude Include="src\SvgParser.h" />
<QtMoc Include="src\TitleWidget.h" /> <QtMoc Include="src\TitleWidget.h" />
<QtMoc Include="src\IconWidget.h" /> <QtMoc Include="src\IconWidget.h" />
<QtMoc Include="src\CaptionButton.h" /> <QtMoc Include="src\CaptionButton.h" />
<QtMoc Include="src\NavigationBarWidget.h" /> <QtMoc Include="src\NavigationBarWidget.h" />
<QtMoc Include="src\Renderer\RendererWidget.h" /> <QtMoc Include="src\Renderer\RendererWidget.h" />
<QtMoc Include="src\Editor\EditorWidget.h" /> <QtMoc Include="src\Editor\EditorWidgetItem.h" />
<ClInclude Include="src\Renderer\Painting\BvhTree.h" /> <ClInclude Include="src\Renderer\Painting\BvhTree.h" />
<ClInclude Include="src\Renderer\Camera.h" /> <ClInclude Include="src\Renderer\Camera.h" />
<ClInclude Include="src\Renderer\Painting\CubicBezier.h" /> <ClInclude Include="src\Renderer\Painting\CubicBezier.h" />
<ClInclude Include="src\Renderer\Painting\CubicMonotonization.h" />
<ClInclude Include="src\Renderer\Drawable.h" /> <ClInclude Include="src\Renderer\Drawable.h" />
<ClInclude Include="src\Renderer\Light.h" /> <ClInclude Include="src\Renderer\Light.h" />
<ClInclude Include="src\Renderer\Painting\Line.h" /> <ClInclude Include="src\Renderer\Painting\Line.h" />
<ClInclude Include="src\Renderer\Mesh.h" /> <ClInclude Include="src\Renderer\Mesh.h" />
<ClInclude Include="src\Renderer\Model.h" /> <ClInclude Include="src\Renderer\Model.h" />
<ClInclude Include="src\Renderer\Painting\PaintingHelper.h" />
<ClInclude Include="src\Renderer\PaintingMesh.h" /> <ClInclude Include="src\Renderer\PaintingMesh.h" />
<ClInclude Include="src\Renderer\Painting\ShortCutTree.h" /> <ClInclude Include="src\Renderer\Painting\ShortCutTree.h" />
<ClInclude Include="src\Renderer\Painting\StraightLine.h" /> <ClInclude Include="src\Renderer\Painting\StraightLine.h" />
<QtMoc Include="src\Renderer\RendererGLWidget.h" /> <QtMoc Include="src\Renderer\RendererGLWidget.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\QGoodWindow\QGoodWindow.vcxproj"> <QtRcc Include="res\MainWindow.qrc" />
<Project>{b982e745-c0b1-46b3-a27b-743af105f2d0}</Project> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FramelessHelper\qmake\FramelessHelperWidgets\FramelessHelperWidgets.vcxproj">
<Project>{e7a71e05-4aa5-31db-a17d-542fc7bd83a3}</Project>
</ProjectReference>
<ProjectReference Include="..\qt-material-widgets\components\components.vcxproj">
<Project>{8f360763-a045-3808-87a9-3fae38e69819}</Project>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -41,23 +41,29 @@
<Filter Include="Header Files\Renderer\Painting"> <Filter Include="Header Files\Renderer\Painting">
<UniqueIdentifier>{22909273-2b23-49fa-84ab-444cefb09656}</UniqueIdentifier> <UniqueIdentifier>{22909273-2b23-49fa-84ab-444cefb09656}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Header Files\Editor\ThirdPartyLib">
<UniqueIdentifier>{11f273e9-b41f-4982-b4ca-12851a03aaae}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Editor\util"> <Filter Include="Header Files\Editor\util">
<UniqueIdentifier>{e3c323ec-d150-4876-8618-5800c87a4941}</UniqueIdentifier> <UniqueIdentifier>{727fd876-d2b0-4928-80a7-2da7cafe1519}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Header Files\Editor\third-party modules"> <Filter Include="Header Files\Editor\ThirdPartyLib\qquick">
<UniqueIdentifier>{30b46cf2-d980-47be-94c4-d2ec1dcc54ed}</UniqueIdentifier> <UniqueIdentifier>{169687a8-6807-4571-802c-c4a95858db3a}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Header Files\Editor\third-party modules\qquick"> <Filter Include="Source Files\Editor\ThirdPartyLib">
<UniqueIdentifier>{5028c879-8b07-4033-81ac-e538a873a837}</UniqueIdentifier> <UniqueIdentifier>{0567e730-5508-4380-8304-86ded8ea3b2f}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Source Files\Editor\third-party modules"> <Filter Include="Source Files\Editor\ThirdPartyLib\qquick">
<UniqueIdentifier>{555d169f-4fa2-4501-b67c-695197b9e6ae}</UniqueIdentifier> <UniqueIdentifier>{cfa316d0-97e0-49b0-9911-baebfea49236}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Editor\third-party modules\qquick">
<UniqueIdentifier>{0b29331b-03b9-44fe-916f-28f5061b4147}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Source Files\Editor\util"> <Filter Include="Source Files\Editor\util">
<UniqueIdentifier>{d7c7ab61-0d05-4e67-9e89-852f3e56fa2f}</UniqueIdentifier> <UniqueIdentifier>{96f98afe-4250-44cb-a505-682a1d5932c3}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Renderer\Preview">
<UniqueIdentifier>{2a8e109f-7791-46ad-8c86-fe22a651cbe7}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Renderer\Preview">
<UniqueIdentifier>{7ead1a66-586a-4584-ae80-9e7a4e667364}</UniqueIdentifier>
</Filter> </Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -70,9 +76,12 @@
<QtUic Include="FramelessWindow.ui"> <QtUic Include="FramelessWindow.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="EditorWidget.ui">
<Filter>Form Files</Filter>
</QtUic>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\Editor\EditorWidget.cpp"> <ClCompile Include="src\Editor\EditorWidgetItem.cpp">
<Filter>Source Files\Editor</Filter> <Filter>Source Files\Editor</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\Renderer\Camera.cpp"> <ClCompile Include="src\Renderer\Camera.cpp">
@ -123,12 +132,6 @@
<ClCompile Include="src\Renderer\Painting\CubicBezier.cpp"> <ClCompile Include="src\Renderer\Painting\CubicBezier.cpp">
<Filter>Source Files\Renderer\Painting</Filter> <Filter>Source Files\Renderer\Painting</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\Renderer\Painting\CubicMonotonization.cpp">
<Filter>Source Files\Renderer\Painting</Filter>
</ClCompile>
<ClCompile Include="src\Renderer\Painting\PaintingHelper.cpp">
<Filter>Source Files\Renderer\Painting</Filter>
</ClCompile>
<ClCompile Include="src\Renderer\Painting\ShortCutTree.cpp"> <ClCompile Include="src\Renderer\Painting\ShortCutTree.cpp">
<Filter>Source Files\Renderer\Painting</Filter> <Filter>Source Files\Renderer\Painting</Filter>
</ClCompile> </ClCompile>
@ -165,16 +168,6 @@
<ClCompile Include="src\Renderer\Painting\CubicBezierSignedDistance.cpp"> <ClCompile Include="src\Renderer\Painting\CubicBezierSignedDistance.cpp">
<Filter>Source Files\Renderer\Painting</Filter> <Filter>Source Files\Renderer\Painting</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\Editor\third-party modules\qquick\qquicksvgparser.cpp">
<Filter>Source Files\Editor\third-party modules\qquick</Filter>
</ClCompile>
<ClCompile Include="src\Editor\third-party modules\util\SvgFileLoader.cpp">
<Filter>Source Files\Editor\util</Filter>
</ClCompile>
<ClCompile Include="src\Editor\third-party modules\SvgHelper.cpp">
<Filter>Source Files\Editor\third-party modules</Filter>
<Filter>Source Files\Editor\third-party modules</Filter>
</ClCompile>
<ClCompile Include="src\Editor\RightBar\LayerTreeWidget.cpp"> <ClCompile Include="src\Editor\RightBar\LayerTreeWidget.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -184,12 +177,54 @@
<ClCompile Include="src\Renderer\Painting\ElementStyle.cpp"> <ClCompile Include="src\Renderer\Painting\ElementStyle.cpp">
<Filter>Source Files\Renderer\Painting</Filter> <Filter>Source Files\Renderer\Painting</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\Renderer\Painting\MaterialStyleFill.cpp">
<Filter>Source Files\Renderer\Painting</Filter>
</ClCompile>
<ClCompile Include="src\Renderer\Painting\BaseStyle.cpp">
<Filter>Source Files\Renderer\Painting</Filter>
</ClCompile>
<ClCompile Include="src\Renderer\Painting\MaterialStyleStroke.cpp">
<Filter>Source Files\Renderer\Painting</Filter>
</ClCompile>
<ClCompile Include="src\Editor\ThirdPartyLib\qquick\qquicksvgparser.cpp">
<Filter>Source Files\Editor\ThirdPartyLib\qquick</Filter>
</ClCompile>
<ClCompile Include="src\Editor\ThirdPartyLib\SvgHelper.cpp">
<Filter>Source Files\Editor\ThirdPartyLib</Filter>
</ClCompile>
<ClCompile Include="src\Editor\util\SvgFileLoader.cpp">
<Filter>Source Files\Editor\util</Filter>
</ClCompile>
<ClCompile Include="src\Editor\util\PainterPathUtil.cpp">
<Filter>Source Files\Editor\util</Filter>
</ClCompile>
<ClCompile Include="src\Renderer\Preview\ElementRenderer.cpp">
<Filter>Source Files\Renderer\Preview</Filter>
</ClCompile>
<ClCompile Include="src\Editor\LayerStyle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Renderer\IblUtils.cpp">
<Filter>Source Files\Renderer</Filter>
</ClCompile>
<ClCompile Include="src\Renderer\VirtualTextureManager.cpp">
<Filter>Source Files\Renderer</Filter>
</ClCompile>
<ClCompile Include="src\gl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Editor\PixelPath.cpp">
<Filter>Source Files\Editor</Filter>
</ClCompile>
<ClCompile Include="src\Editor\EditorWidget.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtMoc Include="src\Renderer\RendererGLWidget.h"> <QtMoc Include="src\Renderer\RendererGLWidget.h">
<Filter>Header Files\Renderer</Filter> <Filter>Header Files\Renderer</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="src\Editor\EditorWidget.h"> <QtMoc Include="src\Editor\EditorWidgetItem.h">
<Filter>Header Files\Editor</Filter> <Filter>Header Files\Editor</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="src\Renderer\RendererWidget.h"> <QtMoc Include="src\Renderer\RendererWidget.h">
@ -219,66 +254,90 @@
<QtMoc Include="src\Editor\RightBar\InfoDisplayWidget.h"> <QtMoc Include="src\Editor\RightBar\InfoDisplayWidget.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</QtMoc> </QtMoc>
<QtMoc Include="src\Editor\EditorWidget.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Shaders\shader.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\shader.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\model.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\model.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\final.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\final.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\painting.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\painting.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\painting.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\model_shadow.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\model_shadow.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\depth_mipmap.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\depth_init.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\model_shadow.geom">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\shadow_mapping.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="Shaders\ssgi.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="darkstyle.qss">
<Filter>Resource Files</Filter>
</None>
<None Include="lightstyle.qss">
<Filter>Resource Files</Filter>
</None>
<None Include="..\data.json" /> <None Include="..\data.json" />
<None Include="res\Shaders\depth_init.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\depth_mipmap.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\element.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\final.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\final.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\model.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\model.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\model_shadow.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\model_shadow.geom">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\model_shadow.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\painting.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\painting.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\painting.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\shader.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\shader.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\shadow_mapping.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\ssgi.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\cubemap.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\cubemap.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\skybox.vert">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\skybox.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\irradiance_convolution.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\cubemap_prefilter.frag">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\brdf_lut.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
<None Include="res\Shaders\pageId_downsample.comp">
<Filter>Resource Files\Shaders</Filter>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtUic Include="EditorWidget.ui"> <QtUic Include="EditorWidgetItem.ui">
<Filter>Form Files</Filter> <Filter>Form Files</Filter>
</QtUic> </QtUic>
<QtUic Include="RendererWidget.ui"> <QtUic Include="RendererWidget.ui">
@ -313,15 +372,9 @@
<ClInclude Include="src\Renderer\Painting\CubicBezier.h"> <ClInclude Include="src\Renderer\Painting\CubicBezier.h">
<Filter>Header Files\Renderer\Painting</Filter> <Filter>Header Files\Renderer\Painting</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Renderer\Painting\CubicMonotonization.h">
<Filter>Header Files\Renderer\Painting</Filter>
</ClInclude>
<ClInclude Include="src\Renderer\Painting\Line.h"> <ClInclude Include="src\Renderer\Painting\Line.h">
<Filter>Header Files\Renderer\Painting</Filter> <Filter>Header Files\Renderer\Painting</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Renderer\Painting\PaintingHelper.h">
<Filter>Header Files\Renderer\Painting</Filter>
</ClInclude>
<ClInclude Include="src\Renderer\Painting\ShortCutTree.h"> <ClInclude Include="src\Renderer\Painting\ShortCutTree.h">
<Filter>Header Files\Renderer\Painting</Filter> <Filter>Header Files\Renderer\Painting</Filter>
</ClInclude> </ClInclude>
@ -352,34 +405,54 @@
<ClInclude Include="src\Renderer\Painting\CubicBezierSignedDistance.h"> <ClInclude Include="src\Renderer\Painting\CubicBezierSignedDistance.h">
<Filter>Header Files\Renderer\Painting</Filter> <Filter>Header Files\Renderer\Painting</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Editor\third-party modules\SvgHelper.h"> <ClInclude Include="src\Renderer\Painting\ElementStyle.h">
<Filter>Header Files\Editor\third-party modules</Filter> <Filter>Header Files\Renderer\Painting</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Editor\third-party modules\qquick\qquicksvgparser_p.h"> <ClInclude Include="src\Editor\ThirdPartyLib\qquick\qquicksvgparser_p.h">
<Filter>Header Files\Editor\third-party modules\qquick</Filter> <Filter>Header Files\Editor\ThirdPartyLib\qquick</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Editor\third-party modules\qquick\qtquickglobal.h"> <ClInclude Include="src\Editor\ThirdPartyLib\qquick\qtquickglobal.h">
<Filter>Header Files\Editor\third-party modules\qquick</Filter> <Filter>Header Files\Editor\ThirdPartyLib\qquick</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Editor\third-party modules\qquick\qtquickglobal_p.h"> <ClInclude Include="src\Editor\ThirdPartyLib\qquick\qtquickglobal_p.h">
<Filter>Header Files\Editor\third-party modules\qquick</Filter> <Filter>Header Files\Editor\ThirdPartyLib\qquick</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Editor\third-party modules\util\SvgFileLoader.h"> <ClInclude Include="src\Editor\ThirdPartyLib\SvgHelper.h">
<Filter>Header Files\Editor\util</Filter> <Filter>Header Files\Editor\ThirdPartyLib</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Editor\LayerWrapper.h"> <ClInclude Include="src\Editor\util\SvgFileLoader.h">
<Filter>Header Files\Editor</Filter>
<Filter>Header Files\Editor\third-party modules\qquick</Filter>
</ClInclude>
<ClInclude Include="src\Editor\third-party modules\util\SvgFileLoader.h">
<Filter>Header Files\Editor\util</Filter> <Filter>Header Files\Editor\util</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Renderer\Painting\ElementStyle.h"> <ClInclude Include="src\Renderer\Painting\ElementStyle.h">
<Filter>Header Files\Renderer\Painting</Filter> <Filter>Header Files\Renderer\Painting</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\Renderer\Painting\MaterialStyleFill.h">
<Filter>Header Files\Renderer\Painting</Filter>
</ClInclude>
<ClInclude Include="src\Renderer\Painting\MaterialStyleStroke.h">
<Filter>Header Files\Renderer\Painting</Filter>
</ClInclude>
<ClInclude Include="src\Editor\util\PainterPathUtil.h">
<Filter>Header Files\Editor\util</Filter>
</ClInclude>
<ClInclude Include="src\Renderer\Preview\ElementRenderer.h">
<Filter>Header Files\Renderer\Preview</Filter>
</ClInclude>
<ClInclude Include="src\Editor\PixelPath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\Renderer\IblUtils.h">
<Filter>Header Files\Renderer</Filter>
</ClInclude>
<ClInclude Include="src\Renderer\Painting\BaseStyle.h">
<Filter>Header Files\Renderer\Painting</Filter>
</ClInclude>
<ClInclude Include="src\Renderer\VirtualTextureManager.h">
<Filter>Header Files\Renderer</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtRcc Include="MainWindow.qrc"> <QtRcc Include="res\MainWindow.qrc">
<Filter>Resource Files</Filter> <Filter>Resource Files</Filter>
</QtRcc> </QtRcc>
</ItemGroup> </ItemGroup>

View File

@ -1,108 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>EditorWidgetClass</class> <class>EditorWidget</class>
<widget class="QWidget" name="EditorWidgetClass"> <widget class="QWidget" name="EditorWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1124</width> <width>1139</width>
<height>695</height> <height>685</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>RendererWidget</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QWidget" name="MainWindow" native="true"> <layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,1,20">
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,30"> <property name="topMargin">
<item> <number>0</number>
<widget class="QLabel" name="Title"> </property>
<property name="text"> <item>
<string>纹理编辑</string> <spacer name="horizontalSpacer_2">
</property> <property name="orientation">
<property name="alignment"> <enum>Qt::Horizontal</enum>
<set>Qt::AlignCenter</set> </property>
</property> <property name="sizeHint" stdset="0">
</widget> <size>
</item> <width>40</width>
<item> <height>20</height>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,18,5"> </size>
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<widget class="QWidget" name="LeftBar" native="true"/> <layout class="QHBoxLayout" name="horizontalLayout_2">
</item> <item>
<item> <widget class="QPushButton" name="createButton">
<widget class="PreviewWindow" name="Preview"/> <property name="minimumSize">
</item> <size>
<item> <width>80</width>
<widget class="QWidget" name="RightBar" native="true"> <height>0</height>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="1,2"> </size>
<item> </property>
<widget class="QTabWidget" name="DisplayTab"> <property name="maximumSize">
<property name="currentIndex"> <size>
<number>0</number> <width>80</width>
</property> <height>16777215</height>
<widget class="InfoDisplayWidget" name="LayerDisplay"> </size>
<attribute name="title"> </property>
<string>Layer</string> <property name="text">
</attribute> <string>新建</string>
</widget> </property>
<widget class="QWidget" name="ElementDisplay"> </widget>
<attribute name="title"> </item>
<string>Element</string> <item>
</attribute> <widget class="QPushButton" name="openButton">
</widget> <property name="minimumSize">
</widget> <size>
</item> <width>80</width>
<item> <height>0</height>
<widget class="LayerTreeWidget" name="LayerTree"> </size>
<property name="contextMenuPolicy"> </property>
<enum>Qt::CustomContextMenu</enum> <property name="maximumSize">
</property> <size>
</widget> <width>80</width>
</item> <height>16777215</height>
</layout> </size>
</widget> </property>
<property name="text">
<string>打开</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveButton">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>保存</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveAsButton">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>另存为</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closeButton">
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>关闭</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </widget>
</layout> </item>
</widget> <item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
</widget>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>PreviewWindow</class>
<extends>QOpenGLWidget</extends>
<header>PreviewWindow.h</header>
</customwidget>
<customwidget>
<class>LayerTreeWidget</class>
<extends>QTreeWidget</extends>
<header location="global">LayerTreeWidget.h</header>
</customwidget>
<customwidget>
<class>InfoDisplayWidget</class>
<extends>QWidget</extends>
<header location="global">InfoDisplayWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EditorWidgetItem</class>
<widget class="QWidget" name="EditorWidgetItem">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1124</width>
<height>695</height>
</rect>
</property>
<property name="windowTitle">
<string>RendererWidget</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="MainWindow" native="true">
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="1,30">
<item>
<widget class="QLabel" name="Title">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,18,5">
<item>
<widget class="QWidget" name="LeftBar" native="true"/>
</item>
<item>
<widget class="PreviewWindow" name="Preview"/>
</item>
<item>
<widget class="QWidget" name="RightBar" native="true">
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="1,2">
<item>
<widget class="QTabWidget" name="DisplayTab">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="InfoDisplayWidget" name="LayerDisplay">
<attribute name="title">
<string>Layer</string>
</attribute>
</widget>
<widget class="QWidget" name="ElementDisplay">
<attribute name="title">
<string>Element</string>
</attribute>
</widget>
</widget>
</item>
<item>
<widget class="LayerTreeWidget" name="LayerTree">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>PreviewWindow</class>
<extends>QOpenGLWidget</extends>
<header>PreviewWindow.h</header>
</customwidget>
<customwidget>
<class>LayerTreeWidget</class>
<extends>QTreeWidget</extends>
<header location="global">LayerTreeWidget.h</header>
</customwidget>
<customwidget>
<class>InfoDisplayWidget</class>
<extends>QWidget</extends>
<header location="global">InfoDisplayWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -38,7 +38,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">#windowFrame{ background-color:palette(Window);}</string> <string notr="true"/>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
@ -56,108 +56,13 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>1</number> <number>1</number>
</property> </property>
<item>
<widget class="TitleWidget" name="windowTitlebar" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">#windowTitlebar{border: 0px none palette(base); border-top-left-radius:5px; border-top-right-radius:5px; background-color:palette(shadow); height:20px;}</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0,0,0,0,0">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="spacer">
<property name="minimumSize">
<size>
<width>4</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>4</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="IconWidget" name="icon" native="true">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="styleSheet">
<string notr="true">#icon {background-color:palette(shadow);}</string>
</property>
</widget>
</item>
<item>
<widget class="TitleWidget" name="titleWidget" native="true"/>
</item>
<item>
<widget class="CaptionButton" name="minimizeButton" native="true"/>
</item>
<item>
<widget class="CaptionButton" name="restoreButton" native="true"/>
</item>
<item>
<widget class="CaptionButton" name="maximizeButton" native="true"/>
</item>
<item>
<widget class="CaptionButton" name="closeButton" native="true"/>
</item>
</layout>
</widget>
</item>
<item> <item>
<widget class="QWidget" name="windowContent" native="true"> <widget class="QWidget" name="windowContent" native="true">
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">#windowContent{ <string notr="true"/>
border: 0px none palette(base);
border-radius:0px 0px 5px 5px;
}</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing"> <property name="spacing">
@ -184,25 +89,6 @@
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>CaptionButton</class>
<extends>QWidget</extends>
<header>CaptionButton.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>IconWidget</class>
<extends>QWidget</extends>
<header>IconWidget.h</header>
</customwidget>
<customwidget>
<class>TitleWidget</class>
<extends>QWidget</extends>
<header>TitleWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

Binary file not shown.

View File

@ -59,20 +59,21 @@
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QTabBar::tab { <string notr="true">
height: 0px; QTabBar::tab.rendererWidget {
margin-top:0px; height: 0px;
} margin-top:0px;
QTabWidget::tab-bar }
{ QTabWidget::tab-bar.rendererWidget
height: 0px; {
top:0px; height: 0px;
} top:0px;
QTabWidget::pane { }
border: 0px; QTabWidget::pane.rendererWidget {
background-color: rgba(0, 0, 0, 0); border: 0px;
} background-color: transparent;
</string> }
</string>
</property> </property>
<property name="tabPosition"> <property name="tabPosition">
<enum>QTabWidget::North</enum> <enum>QTabWidget::North</enum>

View File

@ -13,7 +13,10 @@
<property name="windowTitle"> <property name="windowTitle">
<string>RendererWidget</string> <string>RendererWidget</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -27,20 +30,74 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<spacer name="verticalSpacer"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="orientation"> <property name="sizeConstraint">
<enum>Qt::Vertical</enum> <enum>QLayout::SetDefaultConstraint</enum>
</property> </property>
<property name="sizeType"> <item>
<enum>QSizePolicy::Fixed</enum> <widget class="QPushButton" name="openButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>打开</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QMenuBar" name="menuBar">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="minimumSize">
<size> <size>
<width>20</width> <width>0</width>
<height>40</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> <widget class="QMenu" name="menu">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="title">
<string>打开</string>
</property>
</widget>
<addaction name="menu"/>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
@ -58,11 +115,20 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>12</number>
</property>
<property name="leftMargin">
<number>12</number>
</property>
<property name="rightMargin">
<number>12</number>
</property>
<item> <item>
<widget class="QSlider" name="horizontalSlider"> <widget class="QSlider" name="horizontalSlider">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -71,7 +137,7 @@
<number>180</number> <number>180</number>
</property> </property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Vertical</enum>
</property> </property>
</widget> </widget>
</item> </item>
@ -81,7 +147,23 @@
<number>360</number> <number>360</number>
</property> </property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="exposureSlider">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>200</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -1,159 +0,0 @@
#version 450 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D gBaseColor;
uniform sampler2D gNormal;
uniform sampler2D gPosition;
uniform sampler2D gMetallicRoughness;
uniform sampler2D gDepth;
uniform sampler2D gDirectLight;
uniform sampler2D gIndirectLight;
uniform vec3 mainLightDirection;
uniform vec3 mainLightRadiance;
uniform vec3 camPos;
const float PI = 3.14159265359;
float DistributionGGX(vec3 N, vec3 H, float roughness)
{
float a = roughness*roughness;
float a2 = a*a;
float NdotH = max(dot(N, H), 0.0);
float NdotH2 = NdotH*NdotH;
float nom = a2;
float denom = (NdotH2 * (a2 - 1.0) + 1.0);
denom = PI * denom * denom;
return nom / denom;
}
// ----------------------------------------------------------------------------
float GeometrySchlickGGX(float NdotV, float roughness)
{
float r = (roughness + 1.0);
float k = (r*r) / 8.0;
float nom = NdotV;
float denom = NdotV * (1.0 - k) + k;
return nom / denom;
}
// ----------------------------------------------------------------------------
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
{
float NdotV = max(dot(N, V), 0.0);
float NdotL = max(dot(N, L), 0.0);
float ggx2 = GeometrySchlickGGX(NdotV, roughness);
float ggx1 = GeometrySchlickGGX(NdotL, roughness);
return ggx1 * ggx2;
}
// ----------------------------------------------------------------------------
vec3 fresnelSchlick(float cosTheta, vec3 F0)
{
return F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);
}
void main()
{
//FragColor = vec4(vec3(textureLod(gDepth, TexCoords, 1).x), 1.0);
//FragColor -= vec4(vec3(textureLod(gDepth, TexCoords, 0).x), 1.0);
//ivec2 depthCoords = ivec2(TexCoords*(textureSize(gDepth,0)-ivec2(1)) + vec2(0.5));
//float depth = texelFetch(gDepth, depthCoords/64, 6).x;
//depth -= texelFetch(gDepth, depthCoords, 0).x;
//FragColor = vec4(vec3(depth*10000),1);
//FragColor = vec4(vec3(textureSize(gShadowMap, 0)-vec3(1)),1);
//FragColor = vec4(texture(gRadiance, TexCoords).rgb, 1);
vec3 albedo = pow(texture(gBaseColor, TexCoords).rgb, vec3(2.2));
vec3 color = albedo * texture(gIndirectLight, TexCoords).rgb + texture(gDirectLight, TexCoords).rgb;
color = color / (color + vec3(1.0));
color = pow(color, vec3(1.0/2.2));
FragColor = vec4(color, 1.0);
return;
float metallic = texture(gMetallicRoughness, TexCoords).r;
float roughness = texture(gMetallicRoughness, TexCoords).g;
vec3 N = texture(gNormal, TexCoords).xyz;
vec3 WorldPos = texture(gPosition, TexCoords).xyz;
if(N==vec3(0))
{
vec3 color = mainLightRadiance;
color = color / (color + vec3(1.0));
color = pow(color, vec3(1.0/2.2));
FragColor = vec4(color, 1.0);
return;
}
vec3 V = normalize(camPos - WorldPos);
vec3 F0 = vec3(0.04);
F0 = mix(F0, albedo, metallic);
// reflectance equation
vec3 Lo = vec3(0.0);
// calculate per-light radiance
vec3 L = normalize(mainLightDirection);
vec3 H = normalize(V + L);
//float distance = length(lightPositions[i] - WorldPos);
//float attenuation = 1.0 / (distance * distance);
vec3 radiance = mainLightRadiance ;//* attenuation;
// cook-torrance brdf
float NDF = DistributionGGX(N, H, roughness);
float G = GeometrySmith(N, V, L, roughness);
vec3 F = fresnelSchlick(clamp(dot(H, V),0.,1.), F0);
//F = clamp(F,vec3(0),vec3(1));
vec3 kS = F;
vec3 kD = vec3(1.0) - kS;
kD *= 1.0 - metallic;
vec3 nominator = NDF * G * F;
float denominator = 4.0 * max(dot(N, V), 0.0) * max(dot(N, L), 0.0) + 0.001;
vec3 specular = nominator / denominator;
// add to outgoing radiance Lo
float NdotL = max(dot(N, L), 0.0);
Lo += (kD * albedo / PI + specular) * radiance * NdotL;
vec3 ambient = vec3(0.03) * albedo;
//vec4 FragPosLightSpace = lightSpaceMatrix * vec4(WorldPos, 1.0);
//float bias = 0.08 * max(0.05 * (1.0 - dot(N, L)), 0.005);
//int debugLayer;
//float shadow = ShadowCalculation(WorldPos, N, debugLayer);
//vec3 color = ambient + Lo;
//vec3 color = indirect*1;
float directLight = texture(gDirectLight, TexCoords).r;
color = ambient + directLight * Lo;
//color*=mix(mix(vec3(1,0,0), vec3(0,1,0), float(debugLayer)/shadowCascadeCount/0.5),
//mix(vec3(0,1,0), vec3(0,0,1), float(debugLayer)/(shadowCascadeCount)/0.5-1), float(debugLayer)/(shadowCascadeCount));
//vec3 color = (1.0 - shadow) * Lo;
//vec3 color = (1.0 - shadow) * Lo + indirect*10;
color = color / (color + vec3(1.0));
color = pow(color, vec3(1.0/2.2));
FragColor = vec4(color, 1.0);
//FragColor = vec4(vec3(shadow), 1);
//FragColor = vec4(texture(gShadowNormal, TexCoords).rgb, 1.0);
}

View File

@ -1,13 +0,0 @@
#version 450 core
uniform sampler2D texture_basecolor;
in vec2 TexCoords;
void main()
{
//gBaseColor = vec4(1,0,0,1);
vec4 baseColor = texture(texture_basecolor, TexCoords);
if(baseColor.a<0.4)
discard;
}

View File

@ -1,647 +0,0 @@
#version 450 core
layout(location = 0) out vec4 gBaseColor;
layout(location = 1) out vec3 gNormal;
layout(location = 2) out vec3 gPosition;
layout(location = 3) out vec2 gMetallicRoughness;
layout(location = 4) out uint gPaintingIndex;
layout(location = 5) out vec2 gPaintingTexCoord;
in vec2 TexCoords;
in vec3 WorldPos;
in vec3 Normal;
void main()
{
gBaseColor = vec4( vec3(1),1 );
// mainImage(gBaseColor, vec2(1.,1.)-TexCoords);
gPosition = WorldPos;
gNormal = normalize(Normal);
// gMetallicRoughness = vec2(1, 46./255);
gMetallicRoughness = vec2(0);
gPaintingIndex = 1;
gPaintingTexCoord = vec2(1., 1.) - TexCoords * 2;
return;
}
layout(std430, binding = 1) buffer bvhBuffer
{
uint bvhLength;
uvec2 bvhChildren[];
};
layout(std430, binding = 2) buffer bvhBoundBuffer
{
vec4 bvhBound[];
};
layout(std430, binding = 3) buffer elementOffsetBuffer
{
/**********************
** @x elementBvhRoot
** @y elementBvhLength
** @z pointsOffset
** @w linesOffset
**********************/
uvec4 elementOffset[];
};
layout(std430, binding = 4) buffer elementIndexBuffer
{
uint elementIndexs[]; //ÏߺÍÃæ
};
layout(std430, binding = 5) buffer elementDataBuffer
{
float elementData[]; //µãºÍStyle
};
const float PI = 3.14159265358979;
////////////////////////////////////////////////////////////////////////////
float border = 0;
mat2 inv(mat2 m)
{
return mat2(m[1][1], -m[0][1], -m[1][0], m[0][0]) / (m[0][0] * m[1][1] - m[1][0] * m[0][1]);
}
float abs_min(float a, float b)
{
if (abs(a) < abs(b))
{
return a;
}
else
{
return b;
}
}
int i_mod(int a, int m)
{
return int(mod(float(a), float(m)));
}
float line_dist(vec2 uv, const vec2 p0, vec2 p1)
{
vec2 tang = p1 - p0;
vec2 nor = normalize(vec2(tang.y, -tang.x));
if (dot(tang, uv) < dot(tang, p0))
{
return distance(p0, uv);
}
else if (dot(tang, uv) > dot(tang, p1))
{
return distance(p1, uv);
}
else
{
return dot(nor, uv) - dot(nor, p0);
}
}
bool int_test(vec2 uv, vec2 last_point, vec2 p0, vec2 p1)
{
last_point -= uv;
p0 -= uv;
p1 -= uv;
bool ret;
if (p0.y == 0.)
{
ret = (p0.x >= 0. && p1.y * last_point.y < 0.);
}
else if (p1.y == 0.)
{
ret = false;
}
else if (p0.y * p1.y < 0.)
{
if (p0.x >= 0. && p1.x >= 0.)
{
ret = true;
}
else if (p0.x < 0. && p1.x < 0.)
{
ret = false;
}
else
{
vec2 nor;
if (p0.y > p1.y)
{
nor = p0 - p1;
}
else
{
nor = p1 - p0;
}
nor = vec2(nor.y, -nor.x);
if (dot(nor, p0) < 0.)
{
ret = false;
}
else
{
ret = true;
}
}
}
else
{
ret = false;
}
return ret;
}
bool tri_test(vec2 uv, vec2 p0, vec2 p1, vec2 p2, bool inside)
{
vec2 nor1 = normalize(p0 - p1);
nor1 = vec2(nor1.y, -nor1.x);
vec2 nor2 = normalize(p1 - p2);
nor2 = vec2(nor2.y, -nor2.x);
vec2 tan3 = normalize(p2 - p0);
vec2 nor3 = vec2(tan3.y, -tan3.x);
if (inside)
{
if (dot(tan3, p0) >= dot(tan3, uv) || dot(tan3, p2) <= dot(tan3, uv))
{
return false;
}
float brd = max(dot(nor3, nor1), dot(nor3, nor2)) * border;
return (dot(uv, nor1) >= dot(p0, nor1) && dot(uv, nor2) >= dot(p1, nor2) &&
dot(uv, nor3) >= dot(p2, nor3) + brd) ||
(dot(uv, nor1) <= dot(p0, nor1) && dot(uv, nor2) <= dot(p1, nor2) &&
dot(uv, nor3) <= dot(p2, nor3) - brd);
}
else
{
float brd1 = dot(nor1, tan3) * border;
float brd2 = dot(nor2, tan3) * border;
if (dot(tan3, p0) >= dot(tan3, uv) - brd1 || dot(tan3, p2) <= dot(tan3, uv) - brd2)
{
return false;
}
return (dot(uv, nor1) >= dot(p0, nor1) - border && dot(uv, nor2) >= dot(p1, nor2) - border &&
dot(uv, nor3) >= dot(p2, nor3)) ||
(dot(uv, nor1) <= dot(p0, nor1) + border && dot(uv, nor2) <= dot(p1, nor2) + border &&
dot(uv, nor3) <= dot(p2, nor3));
}
}
float bezier_sd(vec2 uv, vec2 p0, vec2 p1, vec2 p2)
{
const mat2 trf1 = mat2(-1, 2, 1, 2);
mat2 trf2 = inv(mat2(p0 - p1, p2 - p1));
mat2 trf = trf1 * trf2;
uv -= p1;
vec2 xy = trf * uv;
xy.y -= 1.;
vec2 gradient;
gradient.x = 2. * trf[0][0] * (trf[0][0] * uv.x + trf[1][0] * uv.y) - trf[0][1];
gradient.y = 2. * trf[1][0] * (trf[0][0] * uv.x + trf[1][0] * uv.y) - trf[1][1];
return (xy.x * xy.x - xy.y) / length(gradient);
}
////////////////////////////////
// Modified from http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c
// Credits to Doublefresh for hinting there
int solve_quadric(vec2 coeffs, inout vec2 roots)
{
// normal form: x^2 + px + q = 0
float p = coeffs[1] / 2.;
float q = coeffs[0];
float D = p * p - q;
if (D < 0.)
{
return 0;
}
else
{
roots[0] = -sqrt(D) - p;
roots[1] = sqrt(D) - p;
return 2;
}
}
// From Trisomie21
// But instead of his cancellation fix i'm using a newton iteration
int solve_cubic(vec3 coeffs, inout vec3 r)
{
float a = coeffs[2];
float b = coeffs[1];
float c = coeffs[0];
float p = b - a * a / 3.0;
float q = a * (2.0 * a * a - 9.0 * b) / 27.0 + c;
float p3 = p * p * p;
float d = q * q + 4.0 * p3 / 27.0;
float offset = -a / 3.0;
if (d >= 0.0)
{ // Single solution
float z = sqrt(d);
float u = (-q + z) / 2.0;
float v = (-q - z) / 2.0;
u = sign(u) * pow(abs(u), 1.0 / 3.0);
v = sign(v) * pow(abs(v), 1.0 / 3.0);
r[0] = offset + u + v;
// Single newton iteration to account for cancellation
float f = ((r[0] + a) * r[0] + b) * r[0] + c;
float f1 = (3. * r[0] + 2. * a) * r[0] + b;
r[0] -= f / f1;
return 1;
}
float u = sqrt(-p / 3.0);
float v = acos(-sqrt(-27.0 / p3) * q / 2.0) / 3.0;
float m = cos(v), n = sin(v) * 1.732050808;
// Single newton iteration to account for cancellation
//(once for every root)
r[0] = offset + u * (m + m);
r[1] = offset - u * (n + m);
r[2] = offset + u * (n - m);
vec3 f = ((r + a) * r + b) * r + c;
vec3 f1 = (3. * r + 2. * a) * r + b;
r -= f / f1;
return 3;
}
float cubic_bezier_normal_iteration(float t, vec2 a0, vec2 a1, vec2 a2, vec2 a3)
{
// horner's method
vec2 a_2 = a2 + t * a3;
vec2 a_1 = a1 + t * a_2;
vec2 b_2 = a_2 + t * a3;
vec2 uv_to_p = a0 + t * a_1;
vec2 tang = a_1 + t * b_2;
float l_tang = dot(tang, tang);
return t - dot(tang, uv_to_p) / l_tang;
}
float cubic_bezier_dis_approx_sq(vec2 uv, vec2 p0, vec2 p1, vec2 p2, vec2 p3)
{
vec2 a3 = (-p0 + 3. * p1 - 3. * p2 + p3);
vec2 a2 = (3. * p0 - 6. * p1 + 3. * p2);
vec2 a1 = (-3. * p0 + 3. * p1);
vec2 a0 = p0 - uv;
float d0 = 1e38;
float t;
vec3 params = vec3(0, .5, 1);
for (int i = 0; i < 3; i++)
{
t = params[i];
for (int j = 0; j < 3; j++)
{
t = cubic_bezier_normal_iteration(t, a0, a1, a2, a3);
}
t = clamp(t, 0., 1.);
vec2 uv_to_p = ((a3 * t + a2) * t + a1) * t + a0;
d0 = min(d0, dot(uv_to_p, uv_to_p));
}
return d0;
}
// segment_dis_sq by iq
float length2(vec2 v)
{
return dot(v, v);
}
float segment_dis_sq(vec2 p, vec2 a, vec2 b)
{
vec2 pa = p - a, ba = b - a;
float h = clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);
return length2(pa - ba * h);
}
int segment_int_test(vec2 uv, vec2 p0, vec2 p1)
{
p0 -= uv;
p1 -= uv;
int ret;
if (p0.y * p1.y < 0.)
{
vec2 nor = p0 - p1;
nor = vec2(nor.y, -nor.x);
float sgn;
if (p0.y > p1.y)
{
sgn = 1.;
}
else
{
sgn = -1.;
}
if (dot(nor, p0) * sgn < 0.)
{
ret = 0;
}
else
{
ret = 1;
}
}
else
{
ret = 0;
}
return ret;
}
int cubic_bezier_int_test(vec2 uv, vec2 p0, vec2 p1, vec2 p2, vec2 p3)
{
float cu = (-p0.y + 3. * p1.y - 3. * p2.y + p3.y);
float qu = (3. * p0.y - 6. * p1.y + 3. * p2.y);
float li = (-3. * p0.y + 3. * p1.y);
float co = p0.y - uv.y;
vec3 roots = vec3(1e38);
int n_roots;
int n_ints = 0;
if (uv.x < min(min(p0.x, p1.x), min(p2.x, p3.x)))
{
if (uv.y >= min(p0.y, p3.y) && uv.y <= max(p0.y, p3.y))
{
n_ints = 1;
}
}
else
{
if (abs(cu) < .0001)
{
n_roots = solve_quadric(vec2(co / qu, li / qu), roots.xy);
}
else
{
n_roots = solve_cubic(vec3(co / cu, li / cu, qu / cu), roots);
}
for (int i = 0; i < n_roots; i++)
{
if (roots[i] >= 0. && roots[i] <= 1.)
{
float x_pos = -p0.x + 3. * p1.x - 3. * p2.x + p3.x;
x_pos = x_pos * roots[i] + 3. * p0.x - 6. * p1.x + 3. * p2.x;
x_pos = x_pos * roots[i] + -3. * p0.x + 3. * p1.x;
x_pos = x_pos * roots[i] + p0.x;
if (x_pos > uv.x)
{
n_ints++;
}
}
}
}
return n_ints;
}
float path2_dis_sq(vec2 uv)
{
float dis_sq = 1e38;
int num_its = 0;
vec2[45] p = vec2[](vec2(-0.124919, 0.0496896), vec2(-0.127105, 0.0391554), vec2(-0.127105, 0.0405467),
vec2(-0.127105, 0.0463107), vec2(-0.131876, 0.0506833), vec2(-0.143205, 0.0506833),
vec2(-0.177789, 0.0506833), vec2(-0.194286, 0.00795032), vec2(-0.194286, -0.018882),
vec2(-0.194286, -0.0425342), vec2(-0.181366, -0.0508821), vec2(-0.167851, -0.0508821),
vec2(-0.153739, -0.0508821), vec2(-0.144397, -0.0417392), vec2(-0.138236, -0.0325963),
vec2(-0.137043, -0.0445217), vec2(-0.129888, -0.0508821), vec2(-0.118758, -0.0508821),
vec2(-0.108025, -0.0508821), vec2(-0.0901364, -0.0465093), vec2(-0.0788071, -0.0141118),
vec2(-0.087155, -0.0141118), vec2(-0.0901364, -0.0240497), vec2(-0.0955028, -0.0327951),
vec2(-0.103254, -0.0327951), vec2(-0.10882, -0.0327951), vec2(-0.111403, -0.0298137),
vec2(-0.111403, -0.0242485), vec2(-0.111403, -0.0224597), vec2(-0.111205, -0.0204721),
vec2(-0.110609, -0.0178882), vec2(-0.0962985, 0.0496896), vec2(-0.137043, 0.0383603),
vec2(-0.130683, 0.0383603), vec2(-0.128894, 0.0331926), vec2(-0.128894, 0.0308075),
vec2(-0.138435, -0.0141118), vec2(-0.14082, -0.0256398), vec2(-0.149168, -0.0316026),
vec2(-0.154931, -0.0316026), vec2(-0.158509, -0.0316026), vec2(-0.164869, -0.0314042),
vec2(-0.164869, -0.0160994), vec2(-0.164869, 0.00258385), vec2(-0.153938, 0.0383603));
ivec2[6] seg = ivec2[](ivec2(0, 1), ivec2(1, 2), ivec2(20, 21), ivec2(30, 31), ivec2(31, 0), ivec2(35, 36));
ivec4[13] c_bez =
ivec4[](ivec4(2, 3, 4, 5), ivec4(5, 6, 7, 8), ivec4(8, 9, 10, 11), ivec4(11, 12, 13, 14), ivec4(14, 15, 16, 17),
ivec4(17, 18, 19, 20), ivec4(21, 22, 23, 24), ivec4(24, 25, 26, 27), ivec4(27, 28, 29, 30),
ivec4(32, 33, 34, 35), ivec4(36, 37, 38, 39), ivec4(39, 40, 41, 42), ivec4(42, 43, 44, 32));
if (all(lessThan(uv, vec2(-0.0788071, 0.0506833) + border)) &&
all(greaterThan(uv, vec2(-0.194286, -0.0508821) - border)))
{
for (int i = 0; i < 6; i++)
{
dis_sq = min(dis_sq, segment_dis_sq(uv, p[seg[i][0]], p[seg[i][1]]));
num_its += segment_int_test(uv, p[seg[i][0]], p[seg[i][1]]);
}
for (int i = 0; i < 13; i++)
{
dis_sq = min(
dis_sq, cubic_bezier_dis_approx_sq(uv, p[c_bez[i][0]], p[c_bez[i][1]], p[c_bez[i][2]], p[c_bez[i][3]]));
num_its += cubic_bezier_int_test(uv, p[c_bez[i][0]], p[c_bez[i][1]], p[c_bez[i][2]], p[c_bez[i][3]]);
}
}
float sgn = 1.;
if (num_its % 2 == 1)
{
sgn = -1.;
}
return sgn * dis_sq;
}
void mainImage(out vec3 fragColor, in vec2 fragCoord)
{
border = 0.01;
vec2 uv = fragCoord;
uv -= .5;
float dis_sq = 1e38;
if (all(lessThan(uv, vec2(0.4, 0.0993791) + border)) && all(greaterThan(uv, vec2(-0.4, -0.0993791) - border)))
{
dis_sq = min(dis_sq, path2_dis_sq(uv));
}
float dis = sign(dis_sq) * sqrt(abs(dis_sq));
fragColor = vec3(smoothstep(0., border, dis));
if (dis > 0 && dis <= border)
fragColor = vec3(1, 1, 0);
}
///////////////////////////////
const uint STACK_SIZE = 40;
struct Stack
{
uint top;
uint data[STACK_SIZE];
bool empty()
{
return top == 0;
}
bool full()
{
return top == STACK_SIZE;
}
bool getTop(out uint x)
{
if (empty())
return false;
x = data[top - 1];
return true;
}
bool pop()
{
if (empty())
return false;
top--;
return true;
}
bool push(in uint x)
{
if (full())
return false;
data[top] = x;
top++;
return true;
}
} stack, elementStack;
vec3 drawElement(uint elementIndex, vec2 localUV, inout vec3 debugBVH = vec3(0))
{
vec4 elementColor = vec4(0);
uvec4 currentOffset = elementOffset[elementIndex];
uint elementBvhRoot = currentOffset.x;
uint elementBvhLength = currentOffset.y;
uint pointsOffset = currentOffset.z;
uint linesOffset = currentOffset.w;
elementStack.top = 0;
uint elementBvhIndex = 0;
while (elementBvhIndex < elementBvhLength || !elementStack.empty())
{
while (elementBvhIndex < elementBvhLength)
{
vec4 bound = bvhBound[elementBvhRoot + elementBvhIndex];
uint leftChild = bvhChildren[elementBvhRoot + elementBvhIndex].x;
if (all(lessThan(bound.xy, localUV)) && all(lessThan(localUV, bound.zw)))
{
if (leftChild >= elementBvhLength)
{
debugBVH.g += 0.5;
uint styleIndex = bvhChildren[elementBvhRoot + elementBvhIndex].y - elementBvhLength;
// for(int i = 0; i<200;i++)
if (elementData[styleIndex] == 0.) //Ãæ
{
uint lineCount = elementIndexs[leftChild - elementBvhLength];
uint num_its = 0;
for (uint contourIterator = leftChild - elementBvhLength + 1;
contourIterator <= leftChild - elementBvhLength + lineCount; contourIterator++)
{
uint lineIndex = elementIndexs[contourIterator];
uint p0Index = elementIndexs[linesOffset + 4 * lineIndex];
uint p1Index = elementIndexs[linesOffset + 4 * lineIndex + 1];
uint p2Index = elementIndexs[linesOffset + 4 * lineIndex + 2];
uint p3Index = elementIndexs[linesOffset + 4 * lineIndex + 3];
vec2 p0 = vec2(elementData[pointsOffset + 2 * p0Index],
elementData[pointsOffset + 2 * p0Index + 1]);
vec2 p1 = vec2(elementData[pointsOffset + 2 * p1Index],
elementData[pointsOffset + 2 * p1Index + 1]);
vec2 p2 = vec2(elementData[pointsOffset + 2 * p2Index],
elementData[pointsOffset + 2 * p2Index + 1]);
vec2 p3 = vec2(elementData[pointsOffset + 2 * p3Index],
elementData[pointsOffset + 2 * p3Index + 1]);
if (p0 == p1 && p2 == p3)
{
num_its += segment_int_test(localUV, p0, p3);
}
else
num_its += cubic_bezier_int_test(localUV, p0, p1, p2, p3);
}
if (num_its % 2 == 1)
{
elementColor = vec4(1);
//debugHit = true;
}
}
else if (elementData[styleIndex] == 1) //Ïß
{
}
elementBvhIndex = elementBvhLength;
}
else
{
// debugBVH.b += 0.2;
elementStack.push(elementBvhIndex);
elementBvhIndex = leftChild;
}
}
else
elementBvhIndex = elementBvhLength;
}
if (!elementStack.empty())
{
elementStack.getTop(elementBvhIndex);
elementStack.pop();
elementBvhIndex = bvhChildren[elementBvhRoot + elementBvhIndex].y;
}
}
return elementColor.xyz;
}

View File

@ -1,133 +0,0 @@
#version 330 core
uniform sampler2D texture_basecolor;
uniform sampler2D texture_metallic_roughness;
uniform sampler2D texture_normal;
out vec4 FragColor;
in vec2 TexCoords;
in vec3 WorldPos;
in vec3 Normal;
// lights
uniform vec3 lightPositions[4];
uniform vec3 lightColors[4];
uniform vec3 camPos;
const float PI = 3.14159265359;
vec3 getNormalFromMap()
{
vec3 tangentNormal = texture(texture_normal, TexCoords).xyz * 2.0 - 1.0;
vec3 Q1 = dFdx(WorldPos);
vec3 Q2 = dFdy(WorldPos);
vec2 st1 = dFdx(TexCoords);
vec2 st2 = dFdy(TexCoords);
vec3 N = normalize(Normal);
vec3 T = normalize(Q1*st2.t - Q2*st1.t);
vec3 B = -normalize(cross(N, T));
mat3 TBN = mat3(T, B, N);
return normalize(TBN * tangentNormal);
}
// ----------------------------------------------------------------------------
float DistributionGGX(vec3 N, vec3 H, float roughness)
{
float a = roughness*roughness;
float a2 = a*a;
float NdotH = max(dot(N, H), 0.0);
float NdotH2 = NdotH*NdotH;
float nom = a2;
float denom = (NdotH2 * (a2 - 1.0) + 1.0);
denom = PI * denom * denom;
return nom / denom;
}
// ----------------------------------------------------------------------------
float GeometrySchlickGGX(float NdotV, float roughness)
{
float r = (roughness + 1.0);
float k = (r*r) / 8.0;
float nom = NdotV;
float denom = NdotV * (1.0 - k) + k;
return nom / denom;
}
// ----------------------------------------------------------------------------
float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
{
float NdotV = max(dot(N, V), 0.0);
float NdotL = max(dot(N, L), 0.0);
float ggx2 = GeometrySchlickGGX(NdotV, roughness);
float ggx1 = GeometrySchlickGGX(NdotL, roughness);
return ggx1 * ggx2;
}
// ----------------------------------------------------------------------------
vec3 fresnelSchlick(float cosTheta, vec3 F0)
{
return F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);
}
void main()
{
vec4 baseColor = texture(texture_basecolor, TexCoords);
if(baseColor.a<0.4)
discard;
vec3 albedo = pow(baseColor.rgb, vec3(2.2));
float metallic = texture(texture_metallic_roughness, TexCoords).b;
float roughness = texture(texture_metallic_roughness, TexCoords).g;
vec3 N = getNormalFromMap();
vec3 V = normalize(camPos - WorldPos);
vec3 F0 = vec3(0.04);
F0 = mix(F0, albedo, metallic);
// reflectance equation
vec3 Lo = vec3(0.0);
for(int i = 0; i < 1; ++i)
{
// calculate per-light radiance
vec3 L = normalize(lightPositions[i] - WorldPos);
vec3 H = normalize(V + L);
float distance = length(lightPositions[i] - WorldPos);
float attenuation = 1.0 / (distance * distance);
vec3 radiance = lightColors[i] * attenuation;
// cook-torrance brdf
float NDF = DistributionGGX(N, H, roughness);
float G = GeometrySmith(N, V, L, roughness);
vec3 F = fresnelSchlick(max(dot(H, V), 0.0), F0);
F = clamp(F,vec3(0),vec3(1));
vec3 kS = F;
vec3 kD = vec3(1.0) - kS;
kD *= 1.0 - metallic;
vec3 nominator = NDF * G * F;
float denominator = 4.0 * max(dot(N, V), 0.0) * max(dot(N, L), 0.0) + 0.001;
vec3 specular = nominator / denominator;
// add to outgoing radiance Lo
float NdotL = max(dot(N, L), 0.0);
Lo += (kD * albedo / PI + specular) * radiance * NdotL;
}
vec3 ambient = vec3(0.03) * albedo;
vec3 color = ambient + Lo;
color = color / (color + vec3(1.0));
color = pow(color, vec3(1.0/2.2));
FragColor = vec4(color, 1.0);
}

View File

@ -0,0 +1,311 @@
#ifndef __khrplatform_h_
#define __khrplatform_h_
/*
** Copyright (c) 2008-2018 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
/* Khronos platform-specific types and definitions.
*
* The master copy of khrplatform.h is maintained in the Khronos EGL
* Registry repository at https://github.com/KhronosGroup/EGL-Registry
* The last semantic modification to khrplatform.h was at commit ID:
* 67a3e0864c2d75ea5287b9f3d2eb74a745936692
*
* Adopters may modify this file to suit their platform. Adopters are
* encouraged to submit platform specific modifications to the Khronos
* group so that they can be included in future versions of this file.
* Please submit changes by filing pull requests or issues on
* the EGL Registry repository linked above.
*
*
* See the Implementer's Guidelines for information about where this file
* should be located on your system and for more details of its use:
* http://www.khronos.org/registry/implementers_guide.pdf
*
* This file should be included as
* #include <KHR/khrplatform.h>
* by Khronos client API header files that use its types and defines.
*
* The types in khrplatform.h should only be used to define API-specific types.
*
* Types defined in khrplatform.h:
* khronos_int8_t signed 8 bit
* khronos_uint8_t unsigned 8 bit
* khronos_int16_t signed 16 bit
* khronos_uint16_t unsigned 16 bit
* khronos_int32_t signed 32 bit
* khronos_uint32_t unsigned 32 bit
* khronos_int64_t signed 64 bit
* khronos_uint64_t unsigned 64 bit
* khronos_intptr_t signed same number of bits as a pointer
* khronos_uintptr_t unsigned same number of bits as a pointer
* khronos_ssize_t signed size
* khronos_usize_t unsigned size
* khronos_float_t signed 32 bit floating point
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
* nanoseconds
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
* khronos_boolean_enum_t enumerated boolean type. This should
* only be used as a base type when a client API's boolean type is
* an enum. Client APIs which use an integer or other type for
* booleans cannot use this as the base type for their boolean.
*
* Tokens defined in khrplatform.h:
*
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
*
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
*
* Calling convention macros defined in this file:
* KHRONOS_APICALL
* KHRONOS_APIENTRY
* KHRONOS_APIATTRIBUTES
*
* These may be used in function prototypes as:
*
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
* int arg1,
* int arg2) KHRONOS_APIATTRIBUTES;
*/
#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
# define KHRONOS_STATIC 1
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APICALL
*-------------------------------------------------------------------------
* This precedes the return type of the function in the function prototype.
*/
#if defined(KHRONOS_STATIC)
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
# define KHRONOS_APICALL
#elif defined(_WIN32)
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
# define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIENTRY
*-------------------------------------------------------------------------
* This follows the return type of the function and precedes the function
* name in the function prototype.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall
#else
# define KHRONOS_APIENTRY
#endif
/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIATTRIBUTES
*-------------------------------------------------------------------------
* This follows the closing parenthesis of the function prototype arguments.
*/
#if defined (__ARMCC_2__)
#define KHRONOS_APIATTRIBUTES __softfp
#else
#define KHRONOS_APIATTRIBUTES
#endif
/*-------------------------------------------------------------------------
* basic type definitions
*-----------------------------------------------------------------------*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
/*
* Using <stdint.h>
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
/*
* To support platform where unsigned long cannot be used interchangeably with
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
* Ideally, we could just use (u)intptr_t everywhere, but this could result in
* ABI breakage if khronos_uintptr_t is changed from unsigned long to
* unsigned long long or similar (this results in different C++ name mangling).
* To avoid changes for existing platforms, we restrict usage of intptr_t to
* platforms where the size of a pointer is larger than the size of long.
*/
#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__)
#if __SIZEOF_POINTER__ > __SIZEOF_LONG__
#define KHRONOS_USE_INTPTR_T
#endif
#endif
#elif defined(__VMS ) || defined(__sgi)
/*
* Using <inttypes.h>
*/
#include <inttypes.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
/*
* Win32
*/
typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif defined(__sun__) || defined(__digital__)
/*
* Sun or Digital
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#if defined(__arch64__) || defined(_LP64)
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
#else
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#elif 0
/*
* Hypothetical platform with no float or int64 support
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
#else
/*
* Generic fallback
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#endif
/*
* Types that are (so far) the same on all platforms
*/
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
/*
* Types that differ between LLP64 and LP64 architectures - in LLP64,
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
#ifdef KHRONOS_USE_INTPTR_T
typedef intptr_t khronos_intptr_t;
typedef uintptr_t khronos_uintptr_t;
#elif defined(_WIN64)
typedef signed long long int khronos_intptr_t;
typedef unsigned long long int khronos_uintptr_t;
#else
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
#endif
#if defined(_WIN64)
typedef signed long long int khronos_ssize_t;
typedef unsigned long long int khronos_usize_t;
#else
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#endif
#if KHRONOS_SUPPORT_FLOAT
/*
* Float type
*/
typedef float khronos_float_t;
#endif
#if KHRONOS_SUPPORT_INT64
/* Time types
*
* These types can be used to represent a time interval in nanoseconds or
* an absolute Unadjusted System Time. Unadjusted System Time is the number
* of nanoseconds since some arbitrary system event (e.g. since the last
* time the system booted). The Unadjusted System Time is an unsigned
* 64 bit value that wraps back to 0 every 584 years. Time intervals
* may be either signed or unsigned.
*/
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
typedef khronos_int64_t khronos_stime_nanoseconds_t;
#endif
/*
* Dummy value used to pad enum types to 32 bits.
*/
#ifndef KHRONOS_MAX_ENUM
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
#endif
/*
* Enumerated boolean type
*
* Values other than zero should be considered to be true. Therefore
* comparisons should not be made against KHRONOS_TRUE.
*/
typedef enum {
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
} khronos_boolean_enum_t;
#endif /* __khrplatform_h_ */

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More