Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
64a8574
first iteration of filling in evechildturret and fix some typoes in e…
Ikreb1 Jul 24, 2026
3565268
fix formatting
Ikreb1 Jul 24, 2026
add33a3
initalize turret variable and setup _blue file and fix compile error
Ikreb1 Jul 27, 2026
2462b9a
add validation guards
Ikreb1 Jul 27, 2026
f82b14d
fix async loading
Ikreb1 Jul 27, 2026
e58b0bf
cleanup more todos
Ikreb1 Jul 27, 2026
34784fe
impact behviour support
Ikreb1 Jul 27, 2026
0cbdbfd
resolve more todos
Ikreb1 Jul 28, 2026
e05dd34
Add posemodifer interface and remove more todos
Ikreb1 Jul 28, 2026
b22b565
more animation setup, play/stop working now
Ikreb1 Jul 28, 2026
e338a31
runtime child init and firingEffectResPath consumption
Ikreb1 Jul 31, 2026
3b3bd27
remove animation clearing fix
Ikreb1 Aug 4, 2026
889e172
revert initalization and stopanimation
Ikreb1 Aug 4, 2026
170bddd
workaround because clang formatter is being weird
Ikreb1 Aug 5, 2026
352c2f7
Fixed animation rotation snapping to default position on animation stop
JohnGreenFC Aug 12, 2026
4f4bd84
Fixed firing effect not spawning on child turret
JohnGreenFC Aug 14, 2026
daf7095
Extracted shared sysbone aiming math into EveTurretAiming
JohnGreenFC Aug 17, 2026
f2f68d1
Fixed aim snapping when firing starts or stops at a locator
JohnGreenFC Aug 19, 2026
fd03872
Merge remote-tracking branch 'origin/main' into turret-child-object
JohnGreenFC Aug 19, 2026
a79e4ad
Potential fix for pull request finding
Ikreb1 Aug 20, 2026
4e2930b
Potential fix for pull request finding
Ikreb1 Aug 20, 2026
415b91d
WIP PLAT-9853: direct resource bindings (preliminary, pre-perf-tuning…
JohnGreenFC Aug 20, 2026
b60ce97
Merge remote-tracking branch 'origin/turret-child-object' into turret…
JohnGreenFC Aug 20, 2026
e4b79cd
Merge remote-tracking branch 'origin/main' into turret-child-object
JohnGreenFC Aug 20, 2026
d3a8381
Merge remote-tracking branch 'origin/main' into PLAT-9853-resource-de…
JohnGreenFC Sep 7, 2026
4d1c907
PLAT-9853: Metal direct resource bindings replace resource sets
JohnGreenFC Sep 9, 2026
0832965
Skip invalid sampler registers in static resource bindings
JohnGreenFC Aug 27, 2026
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
2 changes: 1 addition & 1 deletion trinity/Eve/SpaceObject/Children/EveChildMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ Tr2PerObjectData* EveChildMesh::GetPerObjectData( ITriRenderBatchAccumulator* ac
if( m_animationUpdater && m_animationUpdater->IsInitialized() )
{
auto meshIndex = m_mesh->GetMeshIndex();
if( auto mesh = m_mesh->GetGeometryResource()->GetMeshData( meshIndex ) )
if( m_mesh->GetGeometryResource()->GetMeshData( meshIndex ) )
{
auto lod = m_mesh->GetGeometryResource()->GetMeshLod( meshIndex, m_currentScreenSize );
if( lod->m_morphTargetAllocation.IsValid() )
Expand Down
11 changes: 5 additions & 6 deletions trinity/Eve/SpaceObject/Children/EveCloudEditableVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,23 +412,22 @@ void EveCloudVolumeTextureParameter::RebuildEffectHandles( Tr2Shader* effectRes
m_isUsedByEffect = true;
}

bool EveCloudVolumeTextureParameter::CopyToResourceSet(
Tr2ResourceSetDescriptionAL& resourceDesc,
void EveCloudVolumeTextureParameter::UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const
ResourceFlags flags,
Tr2RenderContext& renderContext ) const
{
TriTextureRes* resource = m_volume ? m_volume->GetTexture() : nullptr;
bool isSrgb = ( flags & RESOURCE_FLAG_SRGB ) != 0;
auto colorSpace = isSrgb ? Tr2RenderContextEnum::COLOR_SPACE_SRGB : Tr2RenderContextEnum::COLOR_SPACE_LINEAR;
if( Tr2TextureAL* tex = ( resource ? resource->GetTexture() : nullptr ) )
{

return resourceDesc.SetSrv( stage, registerIndex, *tex, colorSpace );
renderContext.SetSrv( stage, registerIndex, *tex, colorSpace );
}
else
{
return resourceDesc.SetSrv( stage, registerIndex, Tr2Renderer::GetFallbackTexture( Tr2EffectResource::TEXTURE_3D, m_name.c_str() ), colorSpace );
renderContext.SetSrv( stage, registerIndex, Tr2Renderer::GetFallbackTexture( Tr2EffectResource::TEXTURE_3D, m_name.c_str() ), colorSpace );
}
}

Expand Down
6 changes: 3 additions & 3 deletions trinity/Eve/SpaceObject/Children/EveCloudEditableVolume.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ BLUE_CLASS( EveCloudVolumeTextureParameter ) :

//////////////////////////////////////////////////////////////////////////
// ITriEffectResourceParameter
virtual bool CopyToResourceSet(
Tr2ResourceSetDescriptionAL & resourceDesc,
void UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const;
ResourceFlags flags,
Tr2RenderContext& renderContext ) const override;
unsigned GetHashValue( unsigned startingHash ) const;

private:
Expand Down
14 changes: 6 additions & 8 deletions trinity/ITr2EffectValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,19 @@ BLUE_INTERFACE( ITr2EffectValue ) :
{
}

virtual bool CopyToResourceSet(
Tr2ResourceSetDescriptionAL & resourceDesc,
virtual void UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const
ResourceFlags flags,
Tr2RenderContext& renderContext ) const
{
return false;
}

virtual bool ApplyUav(
Tr2ResourceSetDescriptionAL & resourceDesc,
virtual void UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const
{
return false;
}

virtual void AddUsedTexture( Tr2BindlessResourcesAL & usedTextures ) const
Expand Down
2 changes: 1 addition & 1 deletion trinity/Raytracing/Tr2RaytracingGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,8 @@ void Tr2RaytracingGeometry::TransformMeshes( Tr2RenderContext& renderContext )
outOffset += lod->m_vertexCount;
}
}
renderContext.ResetResourceBindings();
#if TRINITY_PLATFORM != TRINITY_DIRECTX12
renderContext.SetResourceSet( Tr2ResourceSetAL() );
inVbParam->SetGpuBuffer( static_cast<ITr2GpuBuffer*>( nullptr ) );
outVbParam->SetGpuBuffer( static_cast<ITr2GpuBuffer*>( nullptr ) );
#endif
Expand Down
2 changes: 1 addition & 1 deletion trinity/Raytracing/Tr2RaytracingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Tr2GpuResourcePool::Texture Tr2RaytracingManager::RenderShadows(

if( m_shadowShaderTable.IsValid() )
{
m_shadowEffect->ApplyMaterialDataForRtState( techniqueIndex, pipelineState, renderContext );
m_shadowEffect->ApplyMaterialDataForRtState( techniqueIndex, renderContext );


renderContext.SetConstants( m_shadowPerFrameData, Tr2RenderContextEnum::COMPUTE_SHADER, 2 );
Expand Down
26 changes: 14 additions & 12 deletions trinity/Shader/Parameter/Tr2GeometryBufferParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,40 +101,42 @@ void Tr2GeometryBufferParameter::RebuildEffectHandles( Tr2Shader* effectRes )
}

// --------------------------------------------------------------------------------------
bool Tr2GeometryBufferParameter::CopyToResourceSet(
Tr2ResourceSetDescriptionAL& resourceDesc,
void Tr2GeometryBufferParameter::UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const
ResourceFlags flags,
Tr2RenderContext& renderContext ) const
{
if( !m_gpuBuffer )
{
return false;
return;
}
auto buffer = m_gpuBuffer->GetGpuBuffer( m_meshIndex );
if( !buffer )
{
return false;
return;
}
return resourceDesc.SetSrv( stage, registerIndex, *buffer );
renderContext.SetSrv( stage, registerIndex, *buffer );
}

// --------------------------------------------------------------------------------------
bool Tr2GeometryBufferParameter::ApplyUav(
Tr2ResourceSetDescriptionAL& resourceDesc,
void Tr2GeometryBufferParameter::UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const
{
if( !m_gpuBuffer )
{
return resourceDesc.SetUav( stage, registerIndex, Tr2BufferAL() );
renderContext.SetUav( stage, registerIndex, Tr2BufferAL() );
return;
}
auto buffer = m_gpuBuffer->GetGpuBuffer( m_meshIndex );
if( !buffer )
{
return resourceDesc.SetUav( stage, registerIndex, Tr2BufferAL() );
renderContext.SetUav( stage, registerIndex, Tr2BufferAL() );
return;
}
return resourceDesc.SetUav( stage, registerIndex, *buffer );
renderContext.SetUav( stage, registerIndex, *buffer );
}

// --------------------------------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions trinity/Shader/Parameter/Tr2GeometryBufferParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ BLUE_CLASS( Tr2GeometryBufferParameter ) :

//////////////////////////////////////////////////////////////////////////
// ITriEffectResourceParameter
virtual bool CopyToResourceSet(
Tr2ResourceSetDescriptionAL & resourceDesc,
void UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const;
virtual bool ApplyUav(
Tr2ResourceSetDescriptionAL & resourceDesc,
ResourceFlags flags,
Tr2RenderContext& renderContext ) const override;
void UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const;
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const override;

/////////////////////////////////////////////////////////////////////////////////////
// INotify
Expand Down
24 changes: 12 additions & 12 deletions trinity/Shader/Parameter/Tr2RuntimeTextureParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,44 @@ bool Tr2RuntimeTextureParameter::OnModified( Be::Var* value )
{
for( auto it = begin( m_materials ); it != end( m_materials ); ++it )
{
( *it )->InvalidateResourceSets();
( *it )->ResourceChanged();
}
}
return true;
}

// --------------------------------------------------------------------------------------
bool Tr2RuntimeTextureParameter::CopyToResourceSet(
Tr2ResourceSetDescriptionAL& resourceDesc,
void Tr2RuntimeTextureParameter::UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const
ResourceFlags flags,
Tr2RenderContext& renderContext ) const
{
bool isSrgb = ( flags & RESOURCE_FLAG_SRGB ) != 0;
auto colorSpace = isSrgb ? Tr2RenderContextEnum::COLOR_SPACE_SRGB : Tr2RenderContextEnum::COLOR_SPACE_LINEAR;
if( Tr2TextureAL* tex = ( m_texture ? m_texture->GetTexture() : nullptr ) )
{
return resourceDesc.SetSrv( stage, registerIndex, *tex, colorSpace );
renderContext.SetSrv( stage, registerIndex, *tex, colorSpace );
}
else
{
return resourceDesc.SetSrv( stage, registerIndex, Tr2Renderer::GetFallbackTexture( m_resourceType, m_name.c_str() ), colorSpace );
renderContext.SetSrv( stage, registerIndex, Tr2Renderer::GetFallbackTexture( m_resourceType, m_name.c_str() ), colorSpace );
}
}

// --------------------------------------------------------------------------------------
bool Tr2RuntimeTextureParameter::ApplyUav(
Tr2ResourceSetDescriptionAL& resourceDesc,
void Tr2RuntimeTextureParameter::UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const
{
if( Tr2TextureAL* tex = ( m_texture ? m_texture->GetTexture() : nullptr ) )
{
return resourceDesc.SetUav( stage, registerIndex, *tex, m_uavMipLevel );
renderContext.SetUav( stage, registerIndex, *tex, m_uavMipLevel );
}
else
{
return resourceDesc.SetUav( stage, registerIndex, Tr2TextureAL() );
renderContext.SetUav( stage, registerIndex, Tr2TextureAL() );
}
}

Expand Down Expand Up @@ -116,7 +116,7 @@ void Tr2RuntimeTextureParameter::SetTextureProvider( ITr2TextureProvider* textur
m_texture = texture;
for( auto it = begin( m_materials ); it != end( m_materials ); ++it )
{
( *it )->InvalidateResourceSets();
( *it )->ResourceChanged();
}
}

Expand Down
12 changes: 6 additions & 6 deletions trinity/Shader/Parameter/Tr2RuntimeTextureParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ BLUE_CLASS( Tr2RuntimeTextureParameter ) :

bool OnModified( Be::Var * value ) override;

virtual bool CopyToResourceSet(
Tr2ResourceSetDescriptionAL & resourceDesc,
void UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const;
virtual bool ApplyUav(
Tr2ResourceSetDescriptionAL & resourceDesc,
ResourceFlags flags,
Tr2RenderContext& renderContext ) const override;
void UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const;
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const override;
void AddUsedTexture( Tr2BindlessResourcesAL & usedTextures ) const override;
virtual const char* GetParameterName() const;
virtual void RebuildEffectHandles( Tr2Shader * effectRes );
Expand Down
19 changes: 9 additions & 10 deletions trinity/Shader/Parameter/Tr2TextureAnimationParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,35 @@ bool Tr2TextureAnimationParameter::OnModified( Be::Var* value )
{
for( auto it = begin( m_materials ); it != end( m_materials ); ++it )
{
( *it )->InvalidateResourceSets();
( *it )->ResourceChanged();
}
}
return true;
}

bool Tr2TextureAnimationParameter::CopyToResourceSet(
Tr2ResourceSetDescriptionAL& resourceDesc,
void Tr2TextureAnimationParameter::UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const
ResourceFlags flags,
Tr2RenderContext& renderContext ) const
{
bool isSrgb = ( flags & RESOURCE_FLAG_SRGB ) != 0;
auto colorSpace = isSrgb ? Tr2RenderContextEnum::COLOR_SPACE_SRGB : Tr2RenderContextEnum::COLOR_SPACE_LINEAR;
if( m_animation )
{
return resourceDesc.SetSrv( stage, registerIndex, m_animation->GetTexture( m_channel ), colorSpace );
renderContext.SetSrv( stage, registerIndex, m_animation->GetTexture( m_channel ), colorSpace );
}
else
{
return resourceDesc.SetSrv( stage, registerIndex, Tr2Renderer::GetFallbackTexture( m_resourceType, m_name.c_str() ), colorSpace );
renderContext.SetSrv( stage, registerIndex, Tr2Renderer::GetFallbackTexture( m_resourceType, m_name.c_str() ), colorSpace );
}
}

bool Tr2TextureAnimationParameter::ApplyUav(
Tr2ResourceSetDescriptionAL& resourceDesc,
void Tr2TextureAnimationParameter::UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const
{
return false;
}

const char* Tr2TextureAnimationParameter::GetParameterName() const
Expand Down
12 changes: 6 additions & 6 deletions trinity/Shader/Parameter/Tr2TextureAnimationParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ BLUE_CLASS( Tr2TextureAnimationParameter ) :

bool OnModified( Be::Var * value ) override;

bool CopyToResourceSet(
Tr2ResourceSetDescriptionAL & resourceDesc,
void UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const override;
bool ApplyUav(
Tr2ResourceSetDescriptionAL & resourceDesc,
ResourceFlags flags,
Tr2RenderContext& renderContext ) const override;
void UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const override;
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const override;
const char* GetParameterName() const override;
void RebuildEffectHandles( Tr2Shader * effectRes ) override;
unsigned GetHashValue( unsigned startingHash ) const override;
Expand Down
16 changes: 8 additions & 8 deletions trinity/Shader/Parameter/TriTextureParameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,24 +174,24 @@ void TriTextureParameter::AddUsedTexture( Tr2BindlessResourcesAL& usedTextures )
}

// --------------------------------------------------------------------------------------
bool TriTextureParameter::CopyToResourceSet(
Tr2ResourceSetDescriptionAL& resourceDesc,
void TriTextureParameter::UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const
ResourceFlags flags,
Tr2RenderContext& renderContext ) const
{
bool isSrgb = ( flags & RESOURCE_FLAG_SRGB ) != 0;
auto colorSpace = isSrgb ? Tr2RenderContextEnum::COLOR_SPACE_SRGB : Tr2RenderContextEnum::COLOR_SPACE_LINEAR;
return resourceDesc.SetSrv( stage, registerIndex, m_cachedTexture, colorSpace );
renderContext.SetSrv( stage, registerIndex, m_cachedTexture, colorSpace );
}

// --------------------------------------------------------------------------------------
bool TriTextureParameter::ApplyUav(
Tr2ResourceSetDescriptionAL& resourceDesc,
void TriTextureParameter::UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const
{
return resourceDesc.SetUav( stage, registerIndex, m_cachedTexture, m_uavMipLevel );
renderContext.SetUav( stage, registerIndex, m_cachedTexture, m_uavMipLevel );
}

// ---------------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions trinity/Shader/Parameter/TriTextureParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ BLUE_CLASS( TriTextureParameter ) :
unsigned char* destHandle,
size_t size,
Tr2RenderContext& renderContext ) const override;
virtual bool CopyToResourceSet(
Tr2ResourceSetDescriptionAL & resourceDesc,
void UseSRV(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex,
ResourceFlags flags ) const;
virtual bool ApplyUav(
Tr2ResourceSetDescriptionAL & resourceDesc,
ResourceFlags flags,
Tr2RenderContext& renderContext ) const override;
void UseUav(
Tr2RenderContextEnum::ShaderType stage,
uint32_t registerIndex ) const;
uint32_t registerIndex,
Tr2RenderContext& renderContext ) const override;
void AddUsedTexture( Tr2BindlessResourcesAL & usedTextures ) const override;
unsigned GetHashValue( unsigned startingHash ) const;
bool SupportsDirtyNotification() const override;
Expand Down
Loading
Loading