{
"editorversion" "400"
"editorbuild" "8075"
- "mapversion" "345"
+ "mapversion" "357"
"formatversion" "100"
"prefab" "0"
}
world
{
"id" "1"
- "mapversion" "345"
+ "mapversion" "357"
"classname" "worldspawn"
"detailmaterial" "detail/detailsprites"
"detailvbsp" "detail.vbsp"
}
entity
{
- "id" "2894"
- "classname" "tar_map_divider"
- "maxs" "4096 4096 2"
- "mins" "-4096 -4096 -2"
- "origin" "-80 0 -64"
+ "id" "2969"
+ "classname" "tar_max"
+ "origin" "-368.448 -11.867 140.175"
editor
{
"color" "127 224 0"
"visgroupshown" "1"
"visgroupautoshown" "1"
- "logicalpos" "[0 0]"
+ "logicalpos" "[0 1000]"
+ }
+}
+entity
+{
+ "id" "2971"
+ "classname" "tar_min"
+ "origin" "-344.583 -139.156 33"
+ editor
+ {
+ "color" "127 224 0"
+ "visgroupshown" "1"
+ "visgroupautoshown" "1"
+ "logicalpos" "[0 1500]"
}
}
entity
"classname" "tar_config"
"aoSize" "1000"
"background" "grid.png"
- "colorScheme" "5"
+ "colorScheme" "7"
"customCol0" "104 15 15"
"customCol1" "64 166 38"
"customCol2" "44 199 199"
- "ddsMode" "0"
+ "ddsMode" "2"
"enableAO" "1"
+ "enableOutline" "0"
"ObjectiveUseStripes" "1"
"outlineWidth" "2"
- "ssaam" "3"
+ "ssaam" "1"
"vgroup_cover" "tar_cover"
"vgroup_layout" "tar_layout"
"vgroup_negative" "tar_mask"
"vgroup_overlap" "tar_overlap"
"zColAO" "0 0 0 255"
- "zColBuyzone" "46 211 57 170"
+ "zColBuyzone" "46 211 57 255"
"zColCover" "179 179 179 255"
"zColCover2" "85 85 85 170"
"zColObjective" "0 128 255 255"
- "zColOutline" "204 204 204 153"
+ "zColOutline" "204 204 204 255"
"origin" "-240 592 33"
editor
{
side
{
"id" "315"
- "plane" "(-384 -512 160) (-384 -128 160) (96 -128 160)"
+ "plane" "(-496 -576 160) (-496 -192 160) (-16 -192 160)"
"material" "TERRI/TOOLS/TOOLS_TRIGGER"
- "uaxis" "[1 0 0 -25.6] 3.75"
- "vaxis" "[0 -1 0 -42.6667] 3"
+ "uaxis" "[1 0 0 4.26667] 3.75"
+ "vaxis" "[0 -1 0 -64] 3"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
side
{
"id" "314"
- "plane" "(-384 -128 16) (-384 -512 16) (96 -512 16)"
+ "plane" "(-496 -192 16) (-496 -576 16) (-16 -576 16)"
"material" "TERRI/TOOLS/TOOLS_TRIGGER"
- "uaxis" "[1 0 0 -25.6] 3.75"
- "vaxis" "[0 -1 0 -42.6667] 3"
+ "uaxis" "[1 0 0 4.26667] 3.75"
+ "vaxis" "[0 -1 0 -64] 3"
"rotation" "0"
"lightmapscale" "16"
"smoothing_groups" "0"
side
{
"id" "313"
- "plane" "(-384 -512 16) (-384 -128 16) (-384 -128 160)"
+ "plane" "(-496 -576 16) (-496 -192 16) (-496 -192 160)"
"material" "TERRI/TOOLS/TOOLS_TRIGGER"
- "uaxis" "[0 1 0 42.6667] 3"
+ "uaxis" "[0 1 0 64] 3"
"vaxis" "[0 0 -1 14.2222] 1.125"
"rotation" "0"
"lightmapscale" "16"
side
{
"id" "312"
- "plane" "(96 -128 16) (96 -512 16) (96 -512 160)"
+ "plane" "(-16 -192 16) (-16 -576 16) (-16 -576 160)"
"material" "TERRI/TOOLS/TOOLS_TRIGGER"
- "uaxis" "[0 1 0 42.6667] 3"
+ "uaxis" "[0 1 0 64] 3"
"vaxis" "[0 0 -1 14.2222] 1.125"
"rotation" "0"
"lightmapscale" "16"
side
{
"id" "311"
- "plane" "(-384 -128 16) (96 -128 16) (96 -128 160)"
+ "plane" "(-496 -192 16) (-16 -192 16) (-16 -192 160)"
"material" "TERRI/TOOLS/TOOLS_TRIGGER"
- "uaxis" "[1 0 0 -25.6] 3.75"
+ "uaxis" "[1 0 0 4.26667] 3.75"
"vaxis" "[0 0 -1 14.2222] 1.125"
"rotation" "0"
"lightmapscale" "16"
side
{
"id" "310"
- "plane" "(96 -512 16) (-384 -512 16) (-384 -512 160)"
+ "plane" "(-16 -576 16) (-496 -576 16) (-496 -576 160)"
"material" "TERRI/TOOLS/TOOLS_TRIGGER"
- "uaxis" "[1 0 0 -25.6] 3.75"
+ "uaxis" "[1 0 0 4.26667] 3.75"
"vaxis" "[0 0 -1 14.2222] 1.125"
"rotation" "0"
"lightmapscale" "16"
#version 330 core
+// I sincerily apologize to anyone reading this mess of a shader... -Terri00 21 6 19
+
// OPENGL
// ____________________________________________________________________________________________
in vec2 TexCoords;
return r * r;
}
+float _kernel_filter_glow(usampler2D sampler, usampler2D samplerMask, int sample_size, int inverse)
+{
+ vec2 pixel_size = 1.0 / vec2(textureSize(sampler, 0));
+
+ uint sT = 0U;
+ int sample_double = sample_size * 2;
+
+ // Process kernel
+ for(int x = 0; x <= sample_double; x++){
+ for(int y = 0; y <= sample_double; y++){
+ if(inverse == 0)
+ sT += (texture(sampler, TexCoords + vec2((-sample_size + x) * pixel_size.x, (-sample_size + y) * pixel_size.y)).r) * texture(samplerMask, TexCoords + vec2((-sample_size + x) * pixel_size.x, (-sample_size + y) * pixel_size.y)).r;
+ else sT += (1U - texture(sampler, TexCoords + vec2((-sample_size + x) * pixel_size.x, (-sample_size + y) * pixel_size.y)).r) * texture(samplerMask, TexCoords + vec2((-sample_size + x) * pixel_size.x, (-sample_size + y) * pixel_size.y)).r;
+ }
+ }
+ float r = float(sT) / (sample_double * sample_double);
+ return r * r;
+}
+
// Given a 0-1 mask, return an outline drawn around that mask
float kernel_filter_outline(usampler2D sampler, int sample_size)
{
return float(max(min(sT, 1U) - texture(sampler, TexCoords).r, 0U));
}
+// Given a 0-1 mask, return an outline drawn around that mask
+float _kernel_filter_outline(usampler2D sampler, usampler2D samplerMask, int sample_size)
+{
+ vec2 pixel_size = 1.0 / vec2(textureSize(sampler, 0));
+
+ float sT = 0;
+ int sample_double = sample_size * 2;
+
+ // Process kernel
+ for(int x = 0; x <= sample_double; x++){
+ for(int y = 0; y <= sample_double; y++){
+ sT +=
+ (sample_size - min(length(vec2(-sample_size + x, -sample_size + y)), sample_size)) *
+ float(texture(sampler, TexCoords + vec2((-sample_size + x) * pixel_size.x, (-sample_size + y) * pixel_size.y)).r) *
+ texture(samplerMask, TexCoords + vec2((-sample_size + x) * pixel_size.x, (-sample_size + y) * pixel_size.y)).r;
+ }
+ }
+
+ return float(max(min(sT, 1U) - (texture(sampler, TexCoords).r * texture(samplerMask, TexCoords).r), 0U));
+}
+
void main()
{
//vec4 s_background = texture(tex_background, TexCoords);
final = blend_normal(final, color_objective, // Objectives
(
- (kernel_filter_glow(umask_objectives, 13 * mssascale, 1))
+ (_kernel_filter_glow(umask_objectives, umask_playspace, 13 * mssascale, 1))
* m_objectives
* ( 1 - float((s_info >> 7) & 0x1U))
)
+
(
- kernel_filter_outline(umask_objectives, 3 * mssascale) * 0.9
+ _kernel_filter_outline(umask_objectives, umask_playspace, 3 * mssascale) * 0.9
* ( 1 - float((s_info >> 7) & 0x1U)) * clamp(s_modulate_1_5.r + blend_objective_stripes, 0, 1)
)
+
(
- (kernel_filter_glow(umask_objectives, 13 * mssascale, 0))
+ (_kernel_filter_glow(umask_objectives, umask_playspace, 13 * mssascale, 0))
* ( 1 - m_objectives )
* ( 1 - float((s_info >> 7) & 0x1U))
)
+ + (float(texture(umask_objectives, TexCoords).r * texture(umask_playspace, TexCoords).r) * 0.08)
);
- final = blend_normal(final, color_buyzone, // Objectives
+ final = blend_normal(final, color_buyzone, // Buyzone
(
- (kernel_filter_glow(umask_buyzone, 13 * mssascale, 1))
+ (_kernel_filter_glow(umask_buyzone, umask_playspace, 13 * mssascale, 1))
* m_buyzones
* ( 1 - float((s_info >> 7) & 0x1U))
)
+
(
- kernel_filter_outline(umask_buyzone, 3 * mssascale) * 0.9
+ _kernel_filter_outline(umask_buyzone, umask_playspace, 3 * mssascale) * 0.9
* ( 1 - float((s_info >> 7) & 0x1U))
)
+
(
- (kernel_filter_glow(umask_buyzone, 13 * mssascale, 0))
+ (_kernel_filter_glow(umask_buyzone, umask_playspace, 13 * mssascale, 0))
* ( 1 - m_buyzones )
* ( 1 - float((s_info >> 7) & 0x1U))
)
+ + (float(texture(umask_buyzone, TexCoords).r * texture(umask_playspace, TexCoords).r) * 0.07)
);
FragColor = final;
std::cout << -this->m_map_bounds.SEL.x << "," << this->m_map_bounds.SEL.y << "," << this->m_map_bounds.SEL.z << "\n";
for (auto && min : v->get_entities_by_classname("tar_min"))
- this->m_map_bounds.SEL.y = glm::min(min->m_origin.y, this->m_map_bounds.SEL.y);
+ this->m_map_bounds.SEL.y = glm::max(min->m_origin.y, this->m_map_bounds.SEL.y);
for(auto && max : v->get_entities_by_classname("tar_max"))
- this->m_map_bounds.NWU.y = glm::max(max->m_origin.y, this->m_map_bounds.NWU.y);
+ this->m_map_bounds.NWU.y = glm::min(max->m_origin.y, this->m_map_bounds.NWU.y);
float padding = 128.0f;
std::vector<glm::vec3> intersecting;
float x, _x, y, _y, z, _z;
- _x = _y = _z = 99999.0f;// std::numeric_limits<float>::max();
- x = y = z = -99999.0f;// std::numeric_limits<float>::min();
+ x = _y = _z = 99999.0f;// std::numeric_limits<float>::max();
+ _x = y = z = -99999.0f;// std::numeric_limits<float>::min();
for (int i = 0; i < m_sides.size(); i++) {
for (int j = 0; j < m_sides.size(); j++) {
intersecting.push_back(p);
// Calculate bounds
- _x = glm::round(glm::min(_x, p.x));
+ _x = glm::round(glm::max(_x, p.x));
_y = glm::round(glm::min(_y, p.y));
_z = glm::round(glm::min(_z, p.z));
- x = glm::round(glm::max(x, p.x));
+ x = glm::round(glm::min(x, p.x));
y = glm::round(glm::max(y, p.y));
z = glm::round(glm::max(z, p.z));
}