Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectXTex Environment Map command-line tool (texenvmap) #513

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ jobs:
env:
CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled

- name: 'Build Shaders (TEXENVMAP)'
shell: cmd
working-directory: ./Texenvmap/Shaders
run: CompileShaders.cmd
env:
CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled

- name: Initialize MSVC Code Analysis
uses: microsoft/msvc-code-analysis-action@24c285ab36952c9e9182f4b78dfafbac38a7e5ee # v0.1.1
id: run-analysis
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ packages
/DDSView/Shaders/*.pdb
/DirectXTex/Shaders/Compiled/*.inc
/DirectXTex/Shaders/Compiled/*.pdb
/Texenvmap/Shaders/Compiled/*.inc
/Texenvmap/Shaders/Compiled/*.pdb
/ipch
Debug
Durango
Expand Down
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,29 @@ if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
target_link_libraries(texconv PRIVATE ${PROJECT_NAME} ole32.lib shell32.lib version.lib)
source_group(texconv REGULAR_EXPRESSION Texconv/*.*)
list(APPEND TOOL_EXES texconv)

if (NOT USE_PREBUILT_SHADERS)
add_custom_command(
OUTPUT "${COMPILED_SHADERS}/Texenvmap_VSBasic.inc"
MAIN_DEPENDENCY "${PROJECT_SOURCE_DIR}/Texenvmap/Shaders/CompileShaders.cmd"
DEPENDS "Texenvmap/Shaders/Texenvmap.hlsl"
COMMENT "Generating HLSL shaders for texenvmap..."
COMMAND ${CMAKE_COMMAND} -E env CompileShadersOutput="${COMPILED_SHADERS}" $<$<BOOL:${DIRECTX_FXC_TOOL}>:LegacyShaderCompiler=${DIRECTX_FXC_TOOL}> CompileShaders.cmd > "${COMPILED_SHADERS}/compileshaders_envmap.log"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/Texenvmap/Shaders"
USES_TERMINAL)
endif()

add_executable(texenvmap
Texenvmap/texenvmap.cpp
Texenvmap/texenvmap.rc
Common/CmdLineHelpers.h
Common/settings.manifest
${COMPILED_SHADERS}/Texenvmap_VSBasic.inc)
target_compile_features(texenvmap PRIVATE cxx_std_17)
target_include_directories(texenvmap PRIVATE ${COMPILED_SHADERS})
target_link_libraries(texenvmap PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
source_group(texenvmap REGULAR_EXPRESSION Texenvmap/*.*)
list(APPEND TOOL_EXES texenvmap)
endif()

if(BUILD_TOOLS AND WIN32)
Expand Down
81 changes: 48 additions & 33 deletions DirectXTex_Desktop_2019.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,76 +21,90 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "texenvmap", "Texenvmap\Texenvmap_Desktop_2019.vcxproj", "{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Debug|x64 = Debug|x64
Profile|x86 = Profile|x86
Debug|x86 = Debug|x86
Profile|x64 = Profile|x64
Release|x86 = Release|x86
Profile|x86 = Profile|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x86.ActiveCfg = Debug|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x86.Build.0 = Debug|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.ActiveCfg = Debug|x64
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x64.Build.0 = Debug|x64
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x86.ActiveCfg = Profile|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x86.Build.0 = Profile|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x86.ActiveCfg = Debug|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Debug|x86.Build.0 = Debug|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.ActiveCfg = Profile|x64
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x64.Build.0 = Profile|x64
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x86.ActiveCfg = Release|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x86.Build.0 = Release|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x86.ActiveCfg = Profile|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Profile|x86.Build.0 = Profile|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.ActiveCfg = Release|x64
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x64.Build.0 = Release|x64
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x86.ActiveCfg = Debug|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x86.Build.0 = Debug|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x86.ActiveCfg = Release|Win32
{371B9FA9-4C90-4AC6-A123-ACED756D6C77}.Release|x86.Build.0 = Release|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.ActiveCfg = Debug|x64
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x64.Build.0 = Debug|x64
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x86.ActiveCfg = Profile|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x86.Build.0 = Profile|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x86.ActiveCfg = Debug|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Debug|x86.Build.0 = Debug|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.ActiveCfg = Profile|x64
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x64.Build.0 = Profile|x64
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x86.ActiveCfg = Release|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x86.Build.0 = Release|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x86.ActiveCfg = Profile|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Profile|x86.Build.0 = Profile|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.ActiveCfg = Release|x64
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x64.Build.0 = Release|x64
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x86.ActiveCfg = Debug|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x86.Build.0 = Debug|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x86.ActiveCfg = Release|Win32
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1}.Release|x86.Build.0 = Release|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.ActiveCfg = Debug|x64
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x64.Build.0 = Debug|x64
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x86.ActiveCfg = Profile|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x86.Build.0 = Profile|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x86.ActiveCfg = Debug|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Debug|x86.Build.0 = Debug|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.ActiveCfg = Profile|x64
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x64.Build.0 = Profile|x64
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x86.ActiveCfg = Release|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x86.Build.0 = Release|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x86.ActiveCfg = Profile|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Profile|x86.Build.0 = Profile|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.ActiveCfg = Release|x64
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x64.Build.0 = Release|x64
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x86.ActiveCfg = Debug|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x86.Build.0 = Debug|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x86.ActiveCfg = Release|Win32
{C3A65381-8FD3-4F69-B29E-654B4B0ED136}.Release|x86.Build.0 = Release|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.ActiveCfg = Debug|x64
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x64.Build.0 = Debug|x64
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x86.ActiveCfg = Profile|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x86.Build.0 = Profile|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x86.ActiveCfg = Debug|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Debug|x86.Build.0 = Debug|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.ActiveCfg = Profile|x64
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x64.Build.0 = Profile|x64
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x86.ActiveCfg = Release|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x86.Build.0 = Release|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x86.ActiveCfg = Profile|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Profile|x86.Build.0 = Profile|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.ActiveCfg = Release|x64
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x64.Build.0 = Release|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Debug|x86.ActiveCfg = Debug|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Debug|x86.Build.0 = Debug|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x86.ActiveCfg = Release|Win32
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84}.Release|x86.Build.0 = Release|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Debug|x64.ActiveCfg = Debug|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Debug|x64.Build.0 = Debug|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Profile|x86.ActiveCfg = Profile|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Profile|x86.Build.0 = Profile|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Debug|x86.ActiveCfg = Debug|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Debug|x86.Build.0 = Debug|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Profile|x64.ActiveCfg = Profile|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Profile|x64.Build.0 = Profile|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x86.ActiveCfg = Release|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x86.Build.0 = Release|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Profile|x86.ActiveCfg = Profile|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Profile|x86.Build.0 = Profile|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x64.ActiveCfg = Release|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x64.Build.0 = Release|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x86.ActiveCfg = Release|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x86.Build.0 = Release|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x64.ActiveCfg = Debug|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x64.Build.0 = Debug|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x86.ActiveCfg = Debug|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x86.Build.0 = Debug|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x64.ActiveCfg = Profile|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x64.Build.0 = Profile|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x86.ActiveCfg = Profile|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x86.Build.0 = Profile|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x64.ActiveCfg = Release|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x64.Build.0 = Release|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x86.ActiveCfg = Release|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -100,6 +114,7 @@ Global
{C3A65381-8FD3-4F69-B29E-654B4B0ED136} = {AEA1D9F7-EA95-4BF7-8E6D-0EA068077943}
{9D3EDCAD-A800-43F0-B77F-FE6E4DFA3D84} = {E14090F7-2FE9-47EE-A331-14ED71801FDE}
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D} = {AEA1D9F7-EA95-4BF7-8E6D-0EA068077943}
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C} = {AEA1D9F7-EA95-4BF7-8E6D-0EA068077943}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CFB3C228-4C26-4746-8E0C-71C310403E8C}
Expand Down
21 changes: 21 additions & 0 deletions DirectXTex_Desktop_2019_Win10.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "texdiag", "Texdiag\texdiag_
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{D5A15D28-50AF-4CFA-81F5-3968975BB78C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "texenvmap", "Texenvmap\Texenvmap_Desktop_2019_Win10.vcxproj", "{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Expand Down Expand Up @@ -102,6 +104,24 @@ Global
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x64.Build.0 = Release|x64
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x86.ActiveCfg = Release|Win32
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D}.Release|x86.Build.0 = Release|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|ARM64.ActiveCfg = Debug|ARM64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|ARM64.Build.0 = Debug|ARM64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x64.ActiveCfg = Debug|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x64.Build.0 = Debug|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x86.ActiveCfg = Debug|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Debug|x86.Build.0 = Debug|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|ARM64.ActiveCfg = Profile|ARM64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|ARM64.Build.0 = Profile|ARM64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x64.ActiveCfg = Profile|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x64.Build.0 = Profile|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x86.ActiveCfg = Profile|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Profile|x86.Build.0 = Profile|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|ARM64.ActiveCfg = Release|ARM64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|ARM64.Build.0 = Release|ARM64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x64.ActiveCfg = Release|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x64.Build.0 = Release|x64
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x86.ActiveCfg = Release|Win32
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -110,6 +130,7 @@ Global
{8F18CBD7-4116-4956-BCD8-20D688A4CBD1} = {D5A15D28-50AF-4CFA-81F5-3968975BB78C}
{C3A65381-8FD3-4F69-B29E-654B4B0ED136} = {D5A15D28-50AF-4CFA-81F5-3968975BB78C}
{8E31A619-F4F8-413F-A973-4EE37B1AAA5D} = {D5A15D28-50AF-4CFA-81F5-3968975BB78C}
{618E1A32-0334-4DEB-B1D0-F0A0AFC1DE5C} = {D5A15D28-50AF-4CFA-81F5-3968975BB78C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {22D52797-6BAE-4409-AE3B-513587E92758}
Expand Down
Loading
Loading