Skip to content

Commit

Permalink
Merge pull request #149 from doodlum/dev
Browse files Browse the repository at this point in the history
chore: release 2023-12-23
  • Loading branch information
doodlum committed Dec 23, 2023
2 parents 6afe60a + 0322767 commit 22b95fe
Show file tree
Hide file tree
Showing 25 changed files with 506 additions and 336 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: write

env:
VCPKG_COMMIT_ID: d99b6930b920d85dd4e1edbac37ecb3f354185c0
VCPKG_COMMIT_ID: 417119555f155f6044dec7a379cd25466e339873

jobs:
compile:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/lintpr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.21)

project(
CommunityShaders
VERSION 0.7.0
VERSION 0.7.4
LANGUAGES CXX
)

Expand Down Expand Up @@ -34,6 +34,7 @@ find_package(EASTL CONFIG REQUIRED)
find_package(directxtk CONFIG REQUIRED)
find_path(CLIB_UTIL_INCLUDE_DIRS "ClibUtil/utils.hpp")
find_package(pystring CONFIG REQUIRED)
find_package(cppwinrt CONFIG REQUIRED)

target_include_directories(
${PROJECT_NAME}
Expand All @@ -47,6 +48,7 @@ target_link_libraries(
PRIVATE
debug ${CMAKE_CURRENT_SOURCE_DIR}/include/detours/Debug/detours.lib
optimized ${CMAKE_CURRENT_SOURCE_DIR}/include/detours/Release/detours.lib
Microsoft::CppWinRT
magic_enum::magic_enum
xbyak::xbyak
nlohmann_json::nlohmann_json
Expand Down Expand Up @@ -79,25 +81,26 @@ endif()
# #######################################################################################################################
# # Automatic deployment
# #######################################################################################################################

file(GLOB FEATURE_PATHS LIST_DIRECTORIES true ${CMAKE_SOURCE_DIR}/features/*)

# Automatic deployment to CommunityShaders output directory.
if (AUTO_PLUGIN_DEPLOYMENT)
if(AUTO_PLUGIN_DEPLOYMENT)
foreach(DEPLOY_TARGET $ENV{CommunityShadersOutputDir})
message("Copying package folder with dll/pdb with all features to ${DEPLOY_TARGET}")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/package "${DEPLOY_TARGET}"
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}> "${DEPLOY_TARGET}/SKSE/Plugins/"
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PDB_FILE:${PROJECT_NAME}> "${DEPLOY_TARGET}/SKSE/Plugins/"
)

foreach(FEATURE_PATH ${FEATURE_PATHS})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${FEATURE_PATH} "${DEPLOY_TARGET}"
)
endforeach()
endforeach()
if (NOT DEFINED ENV{CommunityShadersOutputDir})

if(NOT DEFINED ENV{CommunityShadersOutputDir})
message("When using AUTO_PLUGIN_DEPLOYMENT option, you need to set environment variable 'CommunityShadersOutputDir'")
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/Version.rc.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BEGIN
VALUE "FileDescription", "@PROJECT_NAME@"
VALUE "FileVersion", "@PROJECT_VERSION@.0"
VALUE "InternalName", "@PROJECT_NAME@"
VALUE "LegalCopyright", "MIT License"
VALUE "LegalCopyright", "GPL-3.0 License"
VALUE "ProductName", "@PROJECT_NAME@"
VALUE "ProductVersion", "@PROJECT_VERSION@.0"
END
Expand Down
85 changes: 42 additions & 43 deletions cmake/XSEPlugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ elseif(BUILD_FALLOUT4)
set(GameVersion "Fallout 4")
else()
message(
FATAL_ERROR
FATAL_ERROR
"A game must be selected."
)
endif()
Expand All @@ -23,7 +23,7 @@ add_library("${PROJECT_NAME}" SHARED)
target_compile_features(
"${PROJECT_NAME}"
PRIVATE
cxx_std_23
cxx_std_23
)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
Expand All @@ -46,14 +46,14 @@ configure_file(
target_sources(
"${PROJECT_NAME}"
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/cmake/Plugin.h
${CMAKE_CURRENT_BINARY_DIR}/cmake/version.rc
${CMAKE_CURRENT_BINARY_DIR}/cmake/Plugin.h
${CMAKE_CURRENT_BINARY_DIR}/cmake/version.rc
)

target_precompile_headers(
"${PROJECT_NAME}"
PRIVATE
include/PCH.h
include/PCH.h
)

set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
Expand All @@ -62,42 +62,41 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)

if (CMAKE_GENERATOR MATCHES "Visual Studio")
if(CMAKE_GENERATOR MATCHES "Visual Studio")
add_compile_definitions(_UNICODE)

target_compile_definitions(${PROJECT_NAME} PRIVATE "$<$<CONFIG:DEBUG>:DEBUG>")

set(SC_RELEASE_OPTS "/Zi;/fp:fast;/GL;/Gy-;/Gm-;/Gw;/sdl-;/GS-;/guard:cf-;/O2;/Ob2;/Oi;/Ot;/Oy;/fp:except-")
set(SC_RELEASE_OPTS "/Zi;/fp:fast;/GL;/Gy-;/Gm-;/Gw;/sdl-;/GS-;/guard:cf-;/O2;/Ob2;/Oi;/Ot;/Oy;/fp:except-")

target_compile_options(
"${PROJECT_NAME}"
PRIVATE
/MP
/await
/W4
/WX
/permissive-
/Zc:alignedNew
/Zc:auto
/Zc:__cplusplus
/Zc:externC
/Zc:externConstexpr
/Zc:forScope
/Zc:hiddenFriend
/Zc:implicitNoexcept
/Zc:lambda
/Zc:noexceptTypes
/Zc:preprocessor
/Zc:referenceBinding
/Zc:rvalueCast
/Zc:sizedDealloc
/Zc:strictStrings
/Zc:ternary
/Zc:threadSafeInit
/Zc:trigraphs
/Zc:wchar_t
/wd4200 # nonstandard extension used : zero-sized array in struct/union
/arch:AVX2
/MP
/W4
/WX
/permissive-
/Zc:alignedNew
/Zc:auto
/Zc:__cplusplus
/Zc:externC
/Zc:externConstexpr
/Zc:forScope
/Zc:hiddenFriend
/Zc:implicitNoexcept
/Zc:lambda
/Zc:noexceptTypes
/Zc:preprocessor
/Zc:referenceBinding
/Zc:rvalueCast
/Zc:sizedDealloc
/Zc:strictStrings
/Zc:ternary
/Zc:threadSafeInit
/Zc:trigraphs
/Zc:wchar_t
/wd4200 # nonstandard extension used : zero-sized array in struct/union
/arch:AVX
)

target_compile_options(${PROJECT_NAME} PUBLIC "$<$<CONFIG:DEBUG>:/fp:strict>")
Expand All @@ -109,9 +108,9 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
target_link_options(
${PROJECT_NAME}
PRIVATE
/WX
"$<$<CONFIG:DEBUG>:/INCREMENTAL;/OPT:NOREF;/OPT:NOICF>"
"$<$<CONFIG:RELEASE>:/LTCG;/INCREMENTAL:NO;/OPT:REF;/OPT:ICF;/DEBUG:FULL>"
/WX
"$<$<CONFIG:DEBUG>:/INCREMENTAL;/OPT:NOREF;/OPT:NOICF>"
"$<$<CONFIG:RELEASE>:/LTCG;/INCREMENTAL:NO;/OPT:REF;/OPT:ICF;/DEBUG:FULL>"
)
endif()

Expand All @@ -122,14 +121,14 @@ find_package(spdlog CONFIG REQUIRED)
target_include_directories(
${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/cmake
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/cmake
${CMAKE_CURRENT_SOURCE_DIR}/src
)

target_link_libraries(
${PROJECT_NAME}
PUBLIC
CommonLibSSE::CommonLibSSE
${PROJECT_NAME}
PUBLIC
CommonLibSSE::CommonLibSSE
)
2 changes: 1 addition & 1 deletion extern/CommonLibSSE-NG
Submodule CommonLibSSE-NG updated 1500 files
2 changes: 1 addition & 1 deletion features/Grass Lighting/Shaders/Features/GrassLighting.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Info]
Version = 1-3-3
Version = 1-4-0
5 changes: 3 additions & 2 deletions features/Grass Lighting/Shaders/RunGrass.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ cbuffer PerFrame : register(
float SpecularStrength;
float SubsurfaceScatteringAmount;
bool EnableDirLightFix;
bool OverrideComplexGrassSettings;
float BasicGrassBrightness;
float pad[2];
float pad[1];
}

#ifdef VSHADER
Expand Down Expand Up @@ -430,7 +431,7 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace
worldNormal = normalize(mul(normalColor, CalculateTBN(worldNormal, -input.WorldPosition, input.TexCoord.xy)));
}

if (!complex)
if (!complex || OverrideComplexGrassSettings)
baseColor.xyz *= BasicGrassBrightness;

float3 dirLightColor = DirLightColor.xyz;
Expand Down
4 changes: 2 additions & 2 deletions include/PCH.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ namespace DX
}

#include <ClibUtil/distribution.hpp>
#include <ClibUtil/editorID.hpp>
#include <ClibUtil/numeric.hpp>
#include <ClibUtil/rng.hpp>
#include <ClibUtil/simpleINI.hpp>
#include <ClibUtil/editorID.hpp>

#include "imgui.h"

Expand All @@ -139,6 +139,7 @@ using json = nlohmann::json;
#include <EASTL/fixed_slist.h>
#include <EASTL/fixed_vector.h>
#include <EASTL/functional.h>
#include <EASTL/hash_set.h>
#include <EASTL/map.h>
#include <EASTL/numeric_limits.h>
#include <EASTL/set.h>
Expand All @@ -148,7 +149,6 @@ using json = nlohmann::json;
#include <EASTL/unique_ptr.h>
#include <EASTL/unordered_map.h>
#include <EASTL/vector.h>
#include <EASTL/hash_set.h>

#include "SimpleMath.h"

Expand Down
36 changes: 18 additions & 18 deletions package/SKSE/Plugins/CommunityShaders.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Complex Parallax Materials": {
"BlendRange": 0.1679999977350235,
"CRPMRange": 1.0,
"BlendRange": 0.25,
"CRPMRange": 0.5,
"EnableComplexMaterial": 1,
"EnableHighQuality": 0,
"EnableParallax": 1,
"EnableShadows": 1,
"EnableTerrain": 1,
"EnableTerrain": 0,
"Height": 0.10000000149011612,
"MaxDistance": 4096,
"ShadowsEndFade": 1024,
Expand All @@ -25,20 +25,20 @@
"Grass Lighting": {
"BasicGrassBrightness": 0.6660000085830688,
"EnableDirLightFix": 1,
"Glossiness": 8.524999618530273,
"SpecularStrength": 0.1899999976158142,
"SubsurfaceScatteringAmount": 2.0
"Glossiness": 20.0,
"SpecularStrength": 0.5,
"SubsurfaceScatteringAmount": 1.0
},
"Light Limit Fix": {
"EnableContactShadows": true,
"EnableFirstPersonShadows": true,
"EnableContactShadows": false,
"EnableFirstPersonShadows": false,
"EnableParticleLights": true,
"EnableParticleLightsCulling": true,
"EnableParticleLightsDetection": true,
"EnableParticleLightsOptimization": true,
"ParticleLightsBrightness": 1.0,
"ParticleLightsOptimisationClusterRadius": 32,
"ParticleLightsSaturation": 2.0
"ParticleLightsSaturation": 1.0
},
"Menu": {
"Font Scale": 0.0,
Expand All @@ -54,7 +54,7 @@
"ImageSpace": false,
"Lighting": true,
"Particle": false,
"Sky": true,
"Sky": false,
"Utility": false,
"Water": true
},
Expand All @@ -73,7 +73,7 @@
"Tree LOD Lighting": {
"EnableComplexTreeLOD": 1,
"EnableDirLightFix": 1,
"SubsurfaceScatteringAmount": 0.5009999871253967
"SubsurfaceScatteringAmount": 0.5
},
"Version": "0-7-0-0",
"Water Blending": {
Expand All @@ -85,14 +85,14 @@
"Wetness Effects": {
"EnableWetnessEffects": 1,
"MaxDarkness": 1.0,
"MaxOcclusion": 0.0,
"MaxOcclusion": 0.15000000596046448,
"MaxRainWetness": 1.0,
"MaxShoreWetness": 0.5379999876022339,
"MinRoughness": 0.0,
"PuddleFlatness": 1.0,
"PuddleMaxAngle": 0.9900000095367432,
"PuddleMinWetness": 0.7009999752044678,
"PuddleRadius": 1.0049999952316284,
"MaxShoreWetness": 0.5,
"MinRoughness": 0.10000000149011612,
"PuddleFlatness": 0.949999988079071,
"PuddleMaxAngle": 0.8999999761581421,
"PuddleMinWetness": 0.699999988079071,
"PuddleRadius": 1.0,
"ShoreRange": 32
}
}

0 comments on commit 22b95fe

Please sign in to comment.