Skip to content

Commit

Permalink
Merge branch 'OGRECave:master' into patch-3
Browse files Browse the repository at this point in the history
  • Loading branch information
mosfet80 authored Aug 1, 2024
2 parents a684d65 + c366477 commit 5445ba8
Show file tree
Hide file tree
Showing 451 changed files with 41,597 additions and 19,502 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Clang-Format Check
working-directory: ./.github/workflows/
run: python3 run_clang_format.py
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/run_clang_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
'RenderSystems/Metal',
'RenderSystems/NULL',
'PlugIns/ParticleFX',
'PlugIns/ParticleFX2',
'Samples/2.0',
]

g_exceptions = {'stb_image_write.h', 'stb_image.h',
'wgl.h', 'khrplatform.h',
'MurmurHash3.cpp', 'GLX_backdrop.h',
'glcorearb.h', 'glext.h', 'wglext.h',
'gl3w.h', 'glxtokens-backup.h', 'glxext.h',
Expand Down Expand Up @@ -85,7 +87,6 @@
'../../OgreMain/include/Math/Array/NEON/Single/OgreArrayMatrixAf4x3.inl': 1791,
'../../OgreMain/include/Math/Array/SSE2/Single/OgreArrayVector3.inl': 1239,
'../../OgreMain/include/Math/Array/SSE2/Single/OgreArraySphere.inl': 30,
'../../OgreMain/include/Math/Array/SSE2/Single/OgreMathlibSSE2.inl': 393,
'../../OgreMain/include/Math/Array/SSE2/Single/OgreArrayMatrix4.inl': 1530,
'../../OgreMain/include/Math/Array/SSE2/Single/OgreArrayAabb.inl': 219,
'../../OgreMain/include/Math/Array/SSE2/Single/OgreBooleanMask.inl': 126,
Expand Down Expand Up @@ -164,8 +165,8 @@ def collectCppFilesForFormatting():
for fileName in filenames:
fullpath = os.path.join(root, fileName)
ext = os.path.splitext(fileName)[-1].lower()
if(ext == '.cpp' or ext == '.h' or ext == '.inl' or ext == '.mm'):
if(fileName not in g_exceptions):
if (ext == '.cpp' or ext == '.h' or ext == '.inl' or ext == '.mm'):
if (fileName not in g_exceptions):
pathsToParse.append(fullpath)
return pathsToParse

Expand Down
3 changes: 3 additions & 0 deletions CMake/InstallResources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ endif ()
if (NOT OGRE_BUILD_PLUGIN_PFX)
set(OGRE_COMMENT_PLUGIN_PARTICLEFX "#")
endif ()
if (NOT OGRE_BUILD_PLUGIN_PFX2)
set(OGRE_COMMENT_PLUGIN_PARTICLEFX2 "#")
endif ()
if (NOT OGRE_BUILD_COMPONENT_VOLUME)
set(OGRE_COMMENT_COMPONENT_VOLUME "#")
endif ()
Expand Down
3 changes: 3 additions & 0 deletions CMake/OgreFeatureSummary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ endif ()
if (OGRE_BUILD_PLUGIN_PFX)
set(_plugins "${_plugins} + Particle FX\n")
endif ()
if (OGRE_BUILD_PLUGIN_PFX2)
set(_plugins "${_plugins} + Particle FX2\n")
endif ()

if (DEFINED _plugins)
set(_features "${_features}Building plugins:\n${_plugins}")
Expand Down
1 change: 1 addition & 0 deletions CMake/Templates/OgreBuildSettings.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#cmakedefine OGRE_BUILD_RENDERSYSTEM_METAL
#cmakedefine OGRE_BUILD_RENDERSYSTEM_VULKAN
#cmakedefine OGRE_BUILD_PLUGIN_PFX
#cmakedefine OGRE_BUILD_PLUGIN_PFX2
#cmakedefine OGRE_BUILD_COMPONENT_ATMOSPHERE
#cmakedefine OGRE_BUILD_COMPONENT_HLMS_PBS
#cmakedefine OGRE_BUILD_COMPONENT_HLMS_UNLIT
Expand Down
1 change: 1 addition & 0 deletions CMake/Templates/plugins.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ PluginFolder=@OGRE_PLUGIN_DIR_REL@
# If you add another RenderSystem make sure Vulkan is the last one or you might encounter issues on nVidia cards.
@OGRE_COMMENT_RENDERSYSTEM_VULKAN@ PluginOptional=RenderSystem_Vulkan
@OGRE_COMMENT_PLUGIN_PARTICLEFX@ Plugin=Plugin_ParticleFX
@OGRE_COMMENT_PLUGIN_PARTICLEFX2@ Plugin=Plugin_ParticleFX2
1 change: 1 addition & 0 deletions CMake/Templates/plugins_d.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ PluginFolder=@OGRE_PLUGIN_DIR_DBG@
# If you add another RenderSystem make sure Vulkan is the last one or you might encounter issues on nVidia cards.
@OGRE_COMMENT_RENDERSYSTEM_VULKAN@ PluginOptional=RenderSystem_Vulkan_d
@OGRE_COMMENT_PLUGIN_PARTICLEFX@ Plugin=Plugin_ParticleFX_d
@OGRE_COMMENT_PLUGIN_PARTICLEFX2@ Plugin=Plugin_ParticleFX2_d
1 change: 0 additions & 1 deletion CMake/Templates/resources2.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ FileSystem=@OGRE_MEDIA_TEXTURES_DIR@/textures/Cubemaps
FileSystem=@OGRE_MEDIA_DIR_REL@/2.0/scripts/materials/Common
FileSystem=@OGRE_MEDIA_DIR_REL@/2.0/scripts/materials/Common/Any
FileSystem=@OGRE_MEDIA_DIR_REL@/2.0/scripts/materials/Common/GLSL
FileSystem=@OGRE_MEDIA_DIR_REL@/2.0/scripts/materials/Common/GLSLES
FileSystem=@OGRE_MEDIA_DIR_REL@/2.0/scripts/materials/Common/HLSL
FileSystem=@OGRE_MEDIA_DIR_REL@/2.0/scripts/materials/Common/Metal
FileSystem=@OGRE_MEDIA_DIR_REL@/Hlms/Common/Any
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ if( APPLE )
option(OGRE_BUILD_RENDERSYSTEM_METAL "Build Metal RenderSystem (Apple only)" TRUE)
endif()
option(OGRE_BUILD_PLUGIN_PFX "Build ParticleFX plugin" TRUE)
option(OGRE_BUILD_PLUGIN_PFX2 "Build ParticleFX2 plugin" TRUE)

option(OGRE_IDSTRING_USE_128 "Ogre will use 128 for IdString to reduce chances of collisions. Use this if you have approximately >= 10.000 meshes or materials" FALSE)

Expand Down
22 changes: 18 additions & 4 deletions Components/Hlms/Pbs/include/OgreHlmsPbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,26 @@ namespace Ogre
/// Use fixed-colour ambient lighting when upper hemisphere = lower hemisphere,
/// use hemisphere lighting when they don't match.
/// Disables ambient lighting if the colours are black.
AmbientAuto,
AmbientAutoNormal,

/// Same as AmbientAutoNormal but inverts specular & diffuse calculations.
/// See AmbientHemisphereInverted.
///
/// This version was called "AmbientAuto" in OgreNext <= 2.3
AmbientAutoInverted,

/// Force fixed-colour ambient light. Only uses the upper hemisphere paramter.
AmbientFixed,

/// Force hemisphere ambient light. Useful if you plan on adjusting the colours
/// dynamically very often and this might cause swapping shaders.
AmbientHemisphere,
AmbientHemisphereNormal,

/// Same as AmbientHemisphereNormal, but inverts the specular & diffuse calculations
/// which can be visually more pleasant, or you just need it to look how it was in 2.3.
///
/// This version was called "AmbientHemisphere" in OgreNext <= 2.3
AmbientHemisphereInverted,

/// Uses spherical harmonics
AmbientSh,
Expand Down Expand Up @@ -143,7 +155,7 @@ namespace Ogre
ReadOnlyBufferPacked *mGlobalLightListBuffer;

float mMaxSpecIblMipmap;
uint16 mTexBufUnitSlotEnd;
uint16 mTexBufUnitSlotEnd; /// Not used by Ogre but derived implementations may
uint32 mTexUnitSlotStart;

TextureGpuVec const *mPrePassTextures;
Expand Down Expand Up @@ -245,7 +257,8 @@ namespace Ogre

void calculateHashFor( Renderable *renderable, uint32 &outHash, uint32 &outCasterHash ) override;
void calculateHashForPreCreate( Renderable *renderable, PiecesMap *inOutPieces ) override;
void calculateHashForPreCaster( Renderable *renderable, PiecesMap *inOutPieces ) override;
void calculateHashForPreCaster( Renderable *renderable, PiecesMap *inOutPieces,
const PiecesMap *normalPassPieces ) override;

void notifyPropertiesMergedPreGenerationStep( size_t tid ) override;

Expand Down Expand Up @@ -630,6 +643,7 @@ namespace Ogre
static const IdString ExponentialShadowMaps;

static const IdString AmbientHemisphere;
static const IdString AmbientHemisphereInverted;
static const IdString AmbientSh;
static const IdString AmbientShMonochrome;
static const IdString LightProfilesTexture;
Expand Down
2 changes: 1 addition & 1 deletion Components/Hlms/Pbs/include/OgreHlmsPbsDatablock.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ namespace Ogre
@param transparency
Value in range [0; 1] where 0 = full transparency and 1 = fully opaque.
@param mode
@see TransparencyModes
see #TransparencyModes
@param useAlphaFromTextures
When false, the alpha channel of the diffuse maps and detail maps will be
ignored. It's a GPU performance optimization.
Expand Down
Loading

0 comments on commit 5445ba8

Please sign in to comment.