Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Create Scope Flag
  • Loading branch information
Redotix committed Jun 18, 2024
commit d4c843809f644acbbb20d3fd48e22599cf729993
3 changes: 3 additions & 0 deletions src/Layers/xrRender/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,16 @@ ShaderElement::ShaderElement()
// SSS Custom rendering
flags.isLandscape = FALSE;
flags.isWater = FALSE;

flags.isScope = FALSE;
}

BOOL ShaderElement::equal(ShaderElement& S)
{
if (flags.iPriority != S.flags.iPriority) return FALSE;
if (flags.bStrictB2F != S.flags.bStrictB2F) return FALSE;
if (flags.bEmissive != S.flags.bEmissive) return FALSE;
if (flags.isScope != S.flags.isScope) return FALSE;
if (flags.bLandscape != S.flags.bLandscape) return FALSE;
if (flags.bWmark != S.flags.bWmark) return FALSE;
if (flags.bDistort != S.flags.bDistort) return FALSE;
Expand Down
1 change: 1 addition & 0 deletions src/Layers/xrRender/Shader.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ struct ECORE_API ShaderElement : public xr_resource_flagged
u32 bLandscape : 1;
u32 isLandscape : 1;
u32 isWater : 1;
u32 isScope : 1;
};

public:
Expand Down
11 changes: 10 additions & 1 deletion src/Layers/xrRenderDX10/dx10ResourceManager_Scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ class adopt_compiler
return *this;
}

adopt_compiler& _o_scope(bool E)
{
C->SH->flags.isScope = E;
return *this;
}

adopt_compiler& _o_distort(bool E)
{
C->SH->flags.bDistort = E;
Expand Down Expand Up @@ -407,7 +413,10 @@ void CResourceManager::LS_Load()
.def("dx10zfunc", &adopt_compiler::_dx10ZFunc, return_reference_to(_1))

.def("dx10sampler", &adopt_compiler::_dx10sampler) // returns sampler-object
.def("dx10Options", &adopt_compiler::_dx10Options), // returns options-object
.def("dx10Options", &adopt_compiler::_dx10Options) // returns options-object


.def("dx10Scope", &adopt_compiler::_o_scope, return_reference_to(_1)),


class_<adopt_blend>("blend")
Expand Down