Skip to content

Commit

Permalink
Added 3.19.3 source
Browse files Browse the repository at this point in the history
  • Loading branch information
kraifpatrik committed Sep 6, 2023
1 parent 188e9c9 commit baa55fe
Show file tree
Hide file tree
Showing 124 changed files with 20,286 additions and 20,445 deletions.
620 changes: 310 additions & 310 deletions BBMOD_GML/BBMOD.resource_order

Large diffs are not rendered by default.

906 changes: 453 additions & 453 deletions BBMOD_GML/BBMOD.yyp

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions BBMOD_GML/ExpandShaders.py
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os

PATH_SELF = os.path.dirname(os.path.realpath(__file__))
PATH_XSHADERS = os.path.join(PATH_SELF, "Xshaders")
PATH_UBER_VS = os.path.join(PATH_XSHADERS, "Uber_VS.xsh")
PATH_UBER_PS = os.path.join(PATH_XSHADERS, "Uber_PS.xsh")
CMD_XPANDA = "python3 " + os.path.join(PATH_SELF, "Xpanda", "Xpanda.py")

def dict_to_args_str(_dict: dict) -> str:
_arg_str = ""
for k in _dict:
_arg_str += f"{k}={_dict[k]} "
return _arg_str.rstrip()

def expand_shader(_name: str, _defines: dict={}) -> bool:
path_out = os.path.join(PATH_SELF, "shaders", _name)
vsh_out = os.path.join(path_out, f"{_name}.vsh")
fsh_out = os.path.join(path_out, f"{_name}.fsh")
args = f"--x {PATH_XSHADERS} -ci " + dict_to_args_str(_defines)
command_vs = f"{CMD_XPANDA} {PATH_UBER_VS} --o {vsh_out} {args}"
command_ps = f"{CMD_XPANDA} {PATH_UBER_PS} --o {fsh_out} {args}"
print(command_vs)
os.system(command_vs)
print(command_ps)
os.system(command_ps)
return True

def combine(*_args: list[dict]) -> dict:
res = {}
for a in _args:
res.update(a)
return res

ANIMATED = { "X_ANIMATED": 1 }
BATCHED = { "X_BATCHED": 1 }
LIGHTMAP = { "X_LIGHTMAP": 1 }
COLOR = { "X_COLOR": 1 }
SPRITE = { "X_2D": 1 }
PARTICLES = { "X_PARTICLES": 1 }
PBR = { "X_PBR": 1 }
TERRAIN = { "X_TERRAIN": 1 }
OUTPUT_DEPTH = { "X_OUTPUT_DEPTH": 1 }
ID = { "X_ID": 1 }

# Default shaders
expand_shader("BBMOD_ShDefault", combine(PBR))
expand_shader("BBMOD_ShDefaultAnimated", combine(PBR, ANIMATED))
expand_shader("BBMOD_ShDefaultBatched", combine(PBR, BATCHED))

expand_shader("BBMOD_ShDefaultColor", combine(PBR, COLOR))
expand_shader("BBMOD_ShDefaultColorAnimated", combine(PBR, COLOR, ANIMATED))
expand_shader("BBMOD_ShDefaultColorBatched", combine(PBR, COLOR, BATCHED))

expand_shader("BBMOD_ShDefaultLightmap", combine(PBR, LIGHTMAP))
expand_shader("BBMOD_ShDefaultSprite", combine(PBR, SPRITE))

expand_shader("BBMOD_ShDefaultDepth", combine(OUTPUT_DEPTH))
expand_shader("BBMOD_ShDefaultDepthAnimated", combine(OUTPUT_DEPTH, ANIMATED))
expand_shader("BBMOD_ShDefaultDepthBatched", combine(OUTPUT_DEPTH, BATCHED))

expand_shader("BBMOD_ShDefaultDepthColor", combine(OUTPUT_DEPTH, COLOR))
expand_shader("BBMOD_ShDefaultDepthColorAnimated", combine(OUTPUT_DEPTH, COLOR, ANIMATED))
expand_shader("BBMOD_ShDefaultDepthColorBatched", combine(OUTPUT_DEPTH, COLOR, BATCHED))

expand_shader("BBMOD_ShDefaultDepthLightmap", combine(OUTPUT_DEPTH, LIGHTMAP))

expand_shader("BBMOD_ShDefaultUnlit", combine())
expand_shader("BBMOD_ShDefaultUnlitAnimated", combine(ANIMATED))
expand_shader("BBMOD_ShDefaultUnlitBatched", combine(BATCHED))

expand_shader("BBMOD_ShDefaultUnlitColor", combine(COLOR))
expand_shader("BBMOD_ShDefaultUnlitColorAnimated", combine(COLOR, ANIMATED))
expand_shader("BBMOD_ShDefaultUnlitColorBatched", combine(COLOR, BATCHED))

# Gizmo shaders
expand_shader("BBMOD_ShInstanceID", combine(ID, COLOR))
expand_shader("BBMOD_ShInstanceIDAnimated", combine(ID, ANIMATED))
expand_shader("BBMOD_ShInstanceIDBatched", combine(ID, BATCHED))
expand_shader("BBMOD_ShInstanceIDLightmap", combine(ID, LIGHTMAP))

expand_shader("BBMOD_ShInstanceIDColor", combine(ID, COLOR))
expand_shader("BBMOD_ShInstanceIDColorAnimated", combine(ID, COLOR, ANIMATED))
expand_shader("BBMOD_ShInstanceIDColorBatched", combine(ID, COLOR, BATCHED))

# Particle shaders
expand_shader("BBMOD_ShParticleUnlit", combine(PARTICLES))
expand_shader("BBMOD_ShParticleLit", combine(PARTICLES, PBR))
expand_shader("BBMOD_ShParticleDepth", combine(PARTICLES, OUTPUT_DEPTH))

# Terrain shaders
expand_shader("BBMOD_ShTerrainUnlit", combine(TERRAIN))
expand_shader("BBMOD_ShTerrain", combine(TERRAIN, PBR))

# Zombie shaders
ZOMBIE = combine({ "X_ZOMBIE": 1 }, ANIMATED)

expand_shader("ShZombie", combine(ZOMBIE, PBR))
expand_shader("ShZombieDepth", combine(ZOMBIE, OUTPUT_DEPTH))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os

PATH_SELF = os.path.dirname(os.path.realpath(__file__))
PATH_XSHADERS = os.path.join(PATH_SELF, "Xshaders")
PATH_UBER_VS = os.path.join(PATH_XSHADERS, "Uber_VS.xsh")
PATH_UBER_PS = os.path.join(PATH_XSHADERS, "Uber_PS.xsh")
CMD_XPANDA = ("python.exe " if os.name == "nt" else "python3 ") + os.path.join(PATH_SELF, "Xpanda", "Xpanda.py")

def dict_to_args_str(_dict: dict) -> str:
_arg_str = ""
for k in _dict:
_arg_str += f"{k}={_dict[k]} "
return _arg_str.rstrip()

def expand_shader(_name: str, _defines: dict={}) -> bool:
path_out = os.path.join(PATH_SELF, "shaders", _name)
vsh_out = os.path.join(path_out, f"{_name}.vsh")
fsh_out = os.path.join(path_out, f"{_name}.fsh")
args = f"--x {PATH_XSHADERS} -ci " + dict_to_args_str(_defines)
command_vs = f"{CMD_XPANDA} {PATH_UBER_VS} --o {vsh_out} {args}"
command_ps = f"{CMD_XPANDA} {PATH_UBER_PS} --o {fsh_out} {args}"
print(command_vs)
os.system(command_vs)
print(command_ps)
os.system(command_ps)
return True

def combine(*_args: list[dict]) -> dict:
res = {}
for a in _args:
res.update(a)
return res

ANIMATED = { "X_ANIMATED": 1 }
BATCHED = { "X_BATCHED": 1 }
LIGHTMAP = { "X_LIGHTMAP": 1 }
COLOR = { "X_COLOR": 1 }
SPRITE = { "X_2D": 1 }
PARTICLES = { "X_PARTICLES": 1 }
PBR = { "X_PBR": 1 }
TERRAIN = { "X_TERRAIN": 1 }
OUTPUT_DEPTH = { "X_OUTPUT_DEPTH": 1 }
ID = { "X_ID": 1 }

# Default shaders
expand_shader("BBMOD_ShDefault", combine(PBR))
expand_shader("BBMOD_ShDefaultAnimated", combine(PBR, ANIMATED))
expand_shader("BBMOD_ShDefaultBatched", combine(PBR, BATCHED))

expand_shader("BBMOD_ShDefaultColor", combine(PBR, COLOR))
expand_shader("BBMOD_ShDefaultColorAnimated", combine(PBR, COLOR, ANIMATED))
expand_shader("BBMOD_ShDefaultColorBatched", combine(PBR, COLOR, BATCHED))

expand_shader("BBMOD_ShDefaultLightmap", combine(PBR, LIGHTMAP))
expand_shader("BBMOD_ShDefaultSprite", combine(PBR, SPRITE))

expand_shader("BBMOD_ShDefaultDepth", combine(OUTPUT_DEPTH))
expand_shader("BBMOD_ShDefaultDepthAnimated", combine(OUTPUT_DEPTH, ANIMATED))
expand_shader("BBMOD_ShDefaultDepthBatched", combine(OUTPUT_DEPTH, BATCHED))

expand_shader("BBMOD_ShDefaultDepthColor", combine(OUTPUT_DEPTH, COLOR))
expand_shader("BBMOD_ShDefaultDepthColorAnimated", combine(OUTPUT_DEPTH, COLOR, ANIMATED))
expand_shader("BBMOD_ShDefaultDepthColorBatched", combine(OUTPUT_DEPTH, COLOR, BATCHED))

expand_shader("BBMOD_ShDefaultDepthLightmap", combine(OUTPUT_DEPTH, LIGHTMAP))

expand_shader("BBMOD_ShDefaultUnlit", combine())
expand_shader("BBMOD_ShDefaultUnlitAnimated", combine(ANIMATED))
expand_shader("BBMOD_ShDefaultUnlitBatched", combine(BATCHED))

expand_shader("BBMOD_ShDefaultUnlitColor", combine(COLOR))
expand_shader("BBMOD_ShDefaultUnlitColorAnimated", combine(COLOR, ANIMATED))
expand_shader("BBMOD_ShDefaultUnlitColorBatched", combine(COLOR, BATCHED))

# Gizmo shaders
expand_shader("BBMOD_ShInstanceID", combine(ID))
expand_shader("BBMOD_ShInstanceIDAnimated", combine(ID, ANIMATED))
expand_shader("BBMOD_ShInstanceIDBatched", combine(ID, BATCHED))
expand_shader("BBMOD_ShInstanceIDLightmap", combine(ID, LIGHTMAP))

expand_shader("BBMOD_ShInstanceIDColor", combine(ID, COLOR))
expand_shader("BBMOD_ShInstanceIDColorAnimated", combine(ID, COLOR, ANIMATED))
expand_shader("BBMOD_ShInstanceIDColorBatched", combine(ID, COLOR, BATCHED))

# Particle shaders
expand_shader("BBMOD_ShParticleUnlit", combine(PARTICLES))
expand_shader("BBMOD_ShParticleLit", combine(PARTICLES, PBR))
expand_shader("BBMOD_ShParticleDepth", combine(PARTICLES, OUTPUT_DEPTH))

# Terrain shaders
expand_shader("BBMOD_ShTerrainUnlit", combine(TERRAIN))
expand_shader("BBMOD_ShTerrain", combine(TERRAIN, PBR))

# Zombie shaders
ZOMBIE = combine({ "X_ZOMBIE": 1 }, ANIMATED)

expand_shader("ShZombie", combine(ZOMBIE, PBR))
expand_shader("ShZombieDepth", combine(ZOMBIE, OUTPUT_DEPTH))

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/amazonfire/options_amazonfire.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/android/options_android.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/html5/options_html5.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/ios/options_ios.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/linux/options_linux.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/mac/options_mac.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/operagx/options_operagx.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/tvos/options_tvos.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/windows/options_windows.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BBMOD_GML/options/windowsuap/options_windowsuap.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions BBMOD_GML/scripts/BBMOD_BaseRenderer/BBMOD_BaseRenderer.gml
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ function BBMOD_BaseRenderer() constructor
{
_renderQueues[_rqi++].submit();
}
bbmod_material_reset();

surface_reset_target();

Expand Down Expand Up @@ -526,7 +527,6 @@ function BBMOD_BaseRenderer() constructor
// Fill cubemap
bbmod_render_pass_set(BBMOD_ERenderPass.ReflectionCapture);

bbmod_material_reset();
while (_cubemap.set_target())
{
draw_clear(c_black);
Expand Down Expand Up @@ -680,6 +680,7 @@ function BBMOD_BaseRenderer() constructor
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _projection);
Gizmo.submit(Gizmo.MaterialsSelect);
bbmod_material_reset();
surface_reset_target();

if (select_gizmo(_mouseX, _mouseY))
Expand Down Expand Up @@ -710,6 +711,7 @@ function BBMOD_BaseRenderer() constructor
{
_renderQueues[_rqi++].submit();
}
bbmod_material_reset();

surface_reset_target();

Expand Down Expand Up @@ -752,6 +754,7 @@ function BBMOD_BaseRenderer() constructor
{
_renderQueues[_rqi++].submit(_selectedInstances);
}
bbmod_material_reset();

surface_reset_target();

Expand All @@ -765,6 +768,7 @@ function BBMOD_BaseRenderer() constructor
matrix_set(matrix_view, _view);
matrix_set(matrix_projection, _projection);
Gizmo.submit();
bbmod_material_reset();
surface_reset_target();
}

Expand Down Expand Up @@ -802,8 +806,6 @@ function BBMOD_BaseRenderer() constructor
}
}

bbmod_material_reset();

////////////////////////////////////////////////////////////////////////
//
// Reflection probes
Expand Down Expand Up @@ -838,6 +840,7 @@ function BBMOD_BaseRenderer() constructor
{
_renderQueues[_rqi++].submit();
}
bbmod_material_reset();

////////////////////////////////////////////////////////////////////////
//
Expand All @@ -854,15 +857,14 @@ function BBMOD_BaseRenderer() constructor
_queue.clear();
}
}
bbmod_material_reset();

// Reset render pass back to Forward at the end!
bbmod_render_pass_set(BBMOD_ERenderPass.Forward);

// Unset in case it gets destroyed when the room changes etc.
bbmod_shader_unset_global(BBMOD_U_SHADOWMAP);

bbmod_material_reset();

matrix_set(matrix_world, _world);
return self;
};
Expand Down
20 changes: 10 additions & 10 deletions BBMOD_GML/scripts/BBMOD_BaseRenderer/BBMOD_BaseRenderer.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit baa55fe

Please sign in to comment.