tar_config, custom gradients
authorTerri00 <thrustmediaproductions@gmail.com>
Mon, 18 Mar 2019 17:37:28 +0000 (17:37 +0000)
committerTerri00 <thrustmediaproductions@gmail.com>
Mon, 18 Mar 2019 17:37:28 +0000 (17:37 +0000)
19 files changed:
MCDV/GradientMap.hpp [new file with mode: 0644]
MCDV/MCDV.vcxproj
MCDV/MCDV.vcxproj.filters
MCDV/Texture.hpp
MCDV/globals.h
MCDV/interpolation.h
MCDV/main.cpp
MCDV/sample_stuff/de_tavr_test.vmx
MCDV/sample_stuff/map_01.vmx
MCDV/shaders/ss_comp_main.fs
tar_entities/tar_entities.fgd
tar_entities/tar_max.png [new file with mode: 0644]
tar_entities/tar_max.psd [new file with mode: 0644]
tar_entities/tar_max.vmt [new file with mode: 0644]
tar_entities/tar_max.vtf [new file with mode: 0644]
tar_entities/tar_min.png [new file with mode: 0644]
tar_entities/tar_min.psd [new file with mode: 0644]
tar_entities/tar_min.vmt [new file with mode: 0644]
tar_entities/tar_min.vtf [new file with mode: 0644]

diff --git a/MCDV/GradientMap.hpp b/MCDV/GradientMap.hpp
new file mode 100644 (file)
index 0000000..c60cdab
--- /dev/null
@@ -0,0 +1,72 @@
+#include <stdint.h>
+#include <string>
+
+#include "util.h"
+#include "interpolation.h"
+
+struct Color255 {
+       uint8_t r = 0;
+       uint8_t g = 0;
+       uint8_t b = 0;
+       uint8_t a = 255;
+
+       Color255() {
+
+       }
+
+       Color255(std::string src) {
+               std::vector<std::string> strings;
+               strings = split(src);
+
+               if (strings.size() >= 1) r = ::atoi(strings[0].c_str());
+               if (strings.size() >= 2) g = ::atoi(strings[1].c_str());
+               if (strings.size() >= 3) b = ::atoi(strings[2].c_str());
+               if (strings.size() >= 4) a = ::atoi(strings[3].c_str());
+       }
+};
+
+class GradientTexture : public Texture{
+public:
+       Color255 c0;
+       Color255 c1;
+       Color255 c2;
+
+       //unsigned int texture_id;
+
+       GradientTexture(Color255 _c0, Color255 _c1, Color255 _c2) {
+               this->c0 = _c0; this->c1 = _c1; this->c2 = _c2;
+
+               glGenTextures(1, &this->texture_id);
+
+               unsigned char* data = (unsigned char*)malloc(256*4);
+
+               // Do texture generation
+               for (int i = 0; i < 256; i++) {
+                       Color255* a = &this->c0;
+                       Color255* b = &this->c1;
+
+                       if (i >= 128) { a = b; b = &this->c2; }
+
+                       data[i * 4 + 0] = lerpT(a->r, b->r, (float)(i % 128) / 128.0f);
+                       data[i * 4 + 1] = lerpT(a->g, b->g, (float)(i % 128) / 128.0f);
+                       data[i * 4 + 2] = lerpT(a->b, b->b, (float)(i % 128) / 128.0f);
+                       data[i * 4 + 3] = lerpT(a->a, b->a, (float)(i % 128) / 128.0f);
+               }
+
+               glBindTexture(GL_TEXTURE_2D, this->texture_id);
+               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
+
+               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+
+               free(data);
+       }
+
+       /*void bindOnSlot(int slot = 0) {
+               glActiveTexture(GL_TEXTURE0 + slot);
+               glBindTexture(GL_TEXTURE_2D, this->texture_id);
+       }*/
+};
\ No newline at end of file
index fdba9381123734e192f44b4fee9f83d20e251080..04173b126c1bad0f6f57c78ddd4c5defb91a84e6 100644 (file)
     <ClInclude Include="fuzzy_select.h" />
     <ClInclude Include="gamelump.hpp" />
     <ClInclude Include="globals.h" />
+    <ClInclude Include="GradientMap.hpp" />
     <ClInclude Include="interpolation.h" />
     <ClInclude Include="generic.hpp" />
     <ClInclude Include="lumps_geometry.hpp" />
index f7ede5fd58420d40c6732ad824c2470a9489fd70..a059e8083f736dc569d0fd83fdd163a424103eca 100644 (file)
     <ClInclude Include="globals.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="GradientMap.hpp">
+      <Filter>OpenGL\engine</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="main.cpp">
index 8f450ad7331e6e2669fd65fdb68234aac1fa9381..df1e1f9ba13260f977e0e5f6fd31fbfc7334cb37 100644 (file)
@@ -15,6 +15,7 @@ class Texture
 public:
        unsigned int texture_id;
        Texture(std::string filepath, bool clamp = false);
+       Texture() {};
 
        void bind();
        void bindOnSlot(int slot);
index 098dc3ec3f9bb82b935731e5a9eea1e93f3a2713..c105f753415641ad114fa05cc2a8ff4d9bc81bcf 100644 (file)
@@ -1,2 +1,2 @@
 #pragma once
-#define entry_point_testing
\ No newline at end of file
+//#define entry_point_testing
\ No newline at end of file
index 304bf96ff4cd22bf0035542920056aa59b33cac7..f2540771a472f13bf9e4144e06c86615debe264f 100644 (file)
@@ -8,6 +8,11 @@ static float lerpf(float a, float b, float f) {
        return (a * (1.0f - f)) + (b * f);
 }
 
+template<typename T>
+static T lerpT(T a, T b, float f) {
+       return (T)((float)a * (1.0f - f)) + ((float)b * f);
+}
+
 static glm::vec3 lerp(glm::vec3 a, glm::vec3 b, float f) {
        return glm::vec3(lerpf(a.x, b.x, f),
                lerpf(a.y, b.y, f),
index f721d81a7711a0332647d849e2c6f1f5a79d8bd6..bdd5dc5a500eb3645be78336649c53735af8f39f 100644 (file)
@@ -26,6 +26,7 @@
 #define STB_IMAGE_WRITE_IMPLEMENTATION
 #include "stb_image_write.h"
 #include "dds.hpp"
+#include "GradientMap.hpp"
 
 /* Grabs the currently bound framebuffer and saves it to a .png */
 void render_to_png(int x, int y, const char* filepath){
@@ -81,9 +82,20 @@ bool m_comp_shadows_enable;
 bool m_comp_ao_enable;
 #endif
 
+//tar_config overrides
 uint32_t m_renderWidth = 1024;
 uint32_t m_renderHeight = 1024;
 
+bool tar_cfg_enableAO = true;
+int tar_cfg_aoSzie = 16;
+
+bool tar_cfg_enableShadows = false;
+
+bool tar_cfg_enableOutline = false;
+int tar_cfg_outlineSize = 2;
+
+Texture* tar_cfg_gradientMap;
+
 /* Main program */
 int app(int argc, const char** argv) {
 #ifndef _DEBUG
@@ -250,8 +262,10 @@ int app(int argc, const char** argv) {
        std::cout << "Loading textures... ";
 
        Texture tex_background = Texture("textures/grid.png");
-       Texture tex_gradient = Texture("textures/gradients/gradientmap_6.png", true);
+       //Texture tex_gradient = Texture("textures/gradients/gradientmap_6.png", true);
        Texture tex_height_modulate = Texture("textures/modulate.png");
+       
+       //GradientTexture gtex_gradient = GradientTexture(std::string("32 68 136 255"), std::string("149 0 0 255"), std::string("178 113 65"));
 
        std::cout << "done!\n\n";
 
@@ -267,19 +281,57 @@ int app(int argc, const char** argv) {
 
        vmf_main.ComputeGLMeshes();
        vmf_main.ComputeDisplacements();
-       
+
+       // TAR entities
+       std::vector<vmf::Entity*> tavr_ent_tar_config = vmf_main.findEntitiesByClassName("tar_config");
+
+       if (tavr_ent_tar_config.size() > 1) {
+               std::cout << "More than 1 tar config found! Currently unsupported... Using last.\n";
+       }
+
+       vmf::Entity* tar_config = NULL;
+       if (tavr_ent_tar_config.size() > 0) {
+               tar_config = tavr_ent_tar_config.back();
+
+               // Color scheme
+               std::string schemeNum = kv::tryGetStringValue(tar_config->keyValues, "colorScheme", "0");
+               if (schemeNum == "7") { // Custom color scheme
+                       tar_cfg_gradientMap = new GradientTexture(
+                               kv::tryGetStringValue(tar_config->keyValues, "customCol0", "0   0   0   255"),
+                               kv::tryGetStringValue(tar_config->keyValues, "customCol1", "128 128 128 255"),
+                               kv::tryGetStringValue(tar_config->keyValues, "customCol2", "255 255 255 255"));
+               } else {
+                       tar_cfg_gradientMap = new Texture("textures/gradients/gradientmap_" + schemeNum + ".png", true);
+               }
+
+               // Ambient occlusion
+               tar_cfg_enableAO = (kv::tryGetStringValue(tar_config->keyValues, "enableAO", "1") == "1");
+               tar_cfg_aoSzie = kv::tryGetValue(tar_config->keyValues, "aoSize", 16);
+
+               // Outline
+               tar_cfg_enableOutline = (kv::tryGetStringValue(tar_config->keyValues, "enableOutline", "0") == "1");
+               tar_cfg_outlineSize = kv::tryGetValue(tar_config->keyValues, "outlineWidth", 2);
+
+               // Shadows
+               tar_cfg_enableShadows = (kv::tryGetStringValue(tar_config->keyValues, "enableShadows", "0") == "1");
+       }
+       else {
+               tar_cfg_gradientMap = new Texture("textures/gradients/gradientmap_6.png", true);
+       }
+
        std::cout << "Collecting Objects... \n";
-       std::vector<vmf::Solid*> tavr_solids = vmf_main.getAllBrushesInVisGroup("tavr_layout");
-       std::vector<vmf::Solid*> tavr_solids_negative = vmf_main.getAllBrushesInVisGroup("tavr_negative");
+       std::vector<vmf::Solid*> tavr_solids = vmf_main.getAllBrushesInVisGroup(tar_config == NULL? "tar_layout" : kv::tryGetStringValue(tar_config->keyValues, "vgroup_layout", "tar_layout"));
+       std::vector<vmf::Solid*> tavr_solids_negative = vmf_main.getAllBrushesInVisGroup(tar_config == NULL? "tar_mask" : kv::tryGetStringValue(tar_config->keyValues, "vgroup_negative", "tar_mask"));
        std::vector<vmf::Solid*> tavr_entire_brushlist = vmf_main.getAllRenderBrushes();
-       std::vector<vmf::Solid*> tavr_cover = vmf_main.getAllBrushesInVisGroup("tavr_cover"); for (auto && v : tavr_cover) v->temp_mark = true;
+       std::vector<vmf::Solid*> tavr_cover = vmf_main.getAllBrushesInVisGroup(tar_config == NULL ? "tar_cover" : kv::tryGetStringValue(tar_config->keyValues, "vgroup_cover", "tar_cover"));
+       for (auto && v : tavr_cover) { v->temp_mark = true; tavr_solids.push_back(v); }
 
        //std::vector<vmf::Solid*> tavr_solids_funcbrush = vmf_main.getAllBrushesByClassName("func_brush");
        std::vector<vmf::Solid*> tavr_buyzones = vmf_main.getAllBrushesByClassName("func_buyzone");
        std::vector<vmf::Solid*> tavr_bombtargets = vmf_main.getAllBrushesByClassName("func_bomb_target");
 
-       std::vector<vmf::Entity*> tavr_ent_tavr_height_min = vmf_main.findEntitiesByClassName("tavr_height_min");
-       std::vector<vmf::Entity*> tavr_ent_tavr_height_max = vmf_main.findEntitiesByClassName("tavr_height_max");
+       std::vector<vmf::Entity*> tavr_ent_tavr_height_min = vmf_main.findEntitiesByClassName("tar_min");
+       std::vector<vmf::Entity*> tavr_ent_tavr_height_max = vmf_main.findEntitiesByClassName("tar_max");
 
        std::cout << "done!\n";
 
@@ -523,8 +575,11 @@ int app(int argc, const char** argv) {
        shader_comp_main.setVec3("bounds_SEL", glm::vec3(x_bounds_max, y_bounds_min, z_render_min));
 
        /* Render flags */
-       shader_comp_main.setInt("cmdl_shadows_enable", m_comp_shadows_enable ? 1 : 0);
-       shader_comp_main.setInt("cmdl_ao_enable", m_comp_ao_enable ? 1 : 0);
+       shader_comp_main.setInt("cmdl_shadows_enable", tar_cfg_enableShadows ? 1 : 0);
+       shader_comp_main.setInt("cmdl_ao_enable", tar_cfg_enableAO ? 1 : 0);
+       shader_comp_main.setInt("cmdl_ao_size", tar_cfg_aoSzie);
+       shader_comp_main.setInt("cmdl_outline_enable", tar_cfg_enableOutline);
+       shader_comp_main.setInt("cmdl_outline_size", tar_cfg_outlineSize);
 
        /* Bind texture samplers */
        tex_background.bindOnSlot(0);
@@ -536,7 +591,7 @@ int app(int argc, const char** argv) {
        fb_tex_objectives.BindRTtoTexSlot(2);
        shader_comp_main.setInt("tex_objectives", 2);
 
-       tex_gradient.bindOnSlot(4);
+       tar_cfg_gradientMap->bindOnSlot(4);
        shader_comp_main.setInt("tex_gradient", 4);
 
        mesh_screen_quad->Draw();
index 452afc2b776a294d0fb1dd2787be16afc1034fbc..b1237b16c344b4653ca3a0d3f050b0a483ba2f4f 100644 (file)
@@ -2,7 +2,7 @@ versioninfo
 {
        "editorversion" "400"
        "editorbuild" "8075"
-       "mapversion" "54"
+       "mapversion" "91"
        "formatversion" "100"
        "prefab" "0"
 }
@@ -26,12 +26,6 @@ visgroups
                "visgroupid" "13"
                "color" "223 124 205"
        }
-       visgroup
-       {
-               "name" "tavr_cover"
-               "visgroupid" "14"
-               "color" "198 223 188"
-       }
 }
 viewsettings
 {
@@ -44,7 +38,7 @@ viewsettings
 world
 {
        "id" "1"
-       "mapversion" "54"
+       "mapversion" "91"
        "classname" "worldspawn"
        "detailmaterial" "detail/detailsprites"
        "detailvbsp" "detail.vbsp"
@@ -743,161 +737,6 @@ world
                }
        }
        solid
-       {
-               "id" "416"
-               side
-               {
-                       "id" "478"
-                       "plane" "(-616 352 464) (-616 416 464) (-528 416 464)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -128] 0.25"
-                       "vaxis" "[0 -1 0 64] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "479"
-                       "plane" "(-616 416 0) (-616 352 0) (-528 352 0)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -128] 0.25"
-                       "vaxis" "[0 -1 0 64] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "480"
-                       "plane" "(-616 352 0) (-616 416 0) (-616 416 464)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[0 1 0 448] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "481"
-                       "plane" "(-528 416 0) (-528 352 0) (-528 352 464)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[0 1 0 448] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "482"
-                       "plane" "(-616 416 0) (-528 416 0) (-528 416 464)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -128] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "483"
-                       "plane" "(-528 352 0) (-616 352 0) (-616 352 464)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -128] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               editor
-               {
-                       "color" "0 249 138"
-                       "visgroupid" "8"
-                       "visgroupid" "14"
-                       "visgroupshown" "1"
-                       "visgroupautoshown" "1"
-               }
-       }
-       solid
-       {
-               "id" "431"
-               side
-               {
-                       "id" "495"
-                       "plane" "(-896 1080 424) (-808 1080 424) (-808 696 424)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -32] 0.25"
-                       "vaxis" "[0 -1 0 1440] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "494"
-                       "plane" "(-896 696 0) (-808 696 0) (-808 1080 0)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -32] 0.25"
-                       "vaxis" "[0 -1 0 1440] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "493"
-                       "plane" "(-896 1080 424) (-896 696 424) (-896 696 0)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[0 1 0 96] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "492"
-                       "plane" "(-808 1080 0) (-808 696 0) (-808 696 424)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[0 1 0 96] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "491"
-                       "plane" "(-808 1080 424) (-896 1080 424) (-896 1080 0)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -32] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               side
-               {
-                       "id" "490"
-                       "plane" "(-808 696 0) (-896 696 0) (-896 696 424)"
-                       "material" "AR_DIZZY/DIZZY_INSULATION_BACK_COLOR"
-                       "uaxis" "[1 0 0 -32] 0.25"
-                       "vaxis" "[0 0 -1 0] 0.25"
-                       "rotation" "0"
-                       "lightmapscale" "16"
-                       "smoothing_groups" "0"
-               }
-               editor
-               {
-                       "color" "0 249 138"
-                       "visgroupid" "8"
-                       "visgroupshown" "1"
-                       "visgroupautoshown" "1"
-               }
-       }
-       solid
        {
                "id" "346"
                side
@@ -2535,12 +2374,19 @@ entity
 {
        "id" "484"
        "classname" "tar_config"
-       "aoSize" "16"
-       "customCol0" "39 56 79"
-       "customCol1" "77 74 72"
-       "customCol2" "178 113 65"
+       "aoSize" "10"
+       "colorScheme" "1"
+       "customCol0" "32 68 136"
+       "customCol1" "149 0 0"
+       "customCol2" "179 217 26"
+       "enableAO" "1"
+       "enableOutline" "0"
        "enableShadows" "1"
-       "origin" "112.86 3.28465 33"
+       "outlineWidth" "4"
+       "vgroup_cover" "tavr_cover"
+       "vgroup_layout" "tavr_layout"
+       "vgroup_negative" "tavr_negative"
+       "origin" "96 80 32"
        editor
        {
                "color" "220 30 220"
index 54962b3d0d507c87a249685c98c24fa0c0aa73da..79da40312dd7ae05096e75e2d00e00c18970bcb2 100644 (file)
@@ -2,7 +2,7 @@ versioninfo
 {
        "editorversion" "400"
        "editorbuild" "8075"
-       "mapversion" "740"
+       "mapversion" "742"
        "formatversion" "100"
        "prefab" "0"
 }
@@ -44,7 +44,7 @@ viewsettings
 world
 {
        "id" "1"
-       "mapversion" "740"
+       "mapversion" "742"
        "classname" "worldspawn"
        "detailmaterial" "detail/detailsprites"
        "detailvbsp" "detail.vbsp"
@@ -221252,6 +221252,24 @@ world
        }
 }
 entity
+{
+       "id" "293287"
+       "classname" "tar_config"
+       "aoSize" "16"
+       "customCol0" "39 56 79"
+       "customCol1" "77 74 72"
+       "customCol2" "178 113 65"
+       "enableAO" "1"
+       "origin" "-448 -353.209 32"
+       editor
+       {
+               "color" "220 30 220"
+               "visgroupshown" "1"
+               "visgroupautoshown" "1"
+               "logicalpos" "[0 500]"
+       }
+}
+entity
 {
        "id" "289962"
        "classname" "tavr_height_max"
index 544c71e496b7c05d5c09ae5fd10df4ed8f1a5b2f..ee7062bf00c8c74463d91193cfd60e8177cb60db 100644 (file)
@@ -20,7 +20,12 @@ uniform vec2 bombsite_a;     // **Location of bomsite A          (UV Screenspace)
 uniform vec2 bombsite_b;       // **Location of bombsite B         (UV Screenspace)
 
 uniform int cmdl_shadows_enable;       // Commandline switch --ao
+
 uniform int cmdl_ao_enable;                    // Commandline switch --shadows
+uniform int cmdl_ao_size;
+
+uniform int cmdl_outline_enable;
+uniform int cmdl_outline_size;
 
 //                                     SAMPLER UNIFORMS
 // Image Inputs _______________________________________________________________________________
@@ -228,9 +233,9 @@ void main()
        final = blend_normal(final, cover_color, sPlayspace.b);                                                                                                         // Cover
 
        if(cmdl_shadows_enable == 1) final = blend_normal(final, vec4(0,0,0,1), trace_shadow(tex_playspace) * 0.2);             // Shadows
-       if(cmdl_ao_enable == 1) final = blend_normal(final, vec4(0,0,0,1), kernel_ao_basic(tex_playspace, 0, 8) * 0.9); // AO
+       if(cmdl_ao_enable == 1) final = blend_normal(final, vec4(0,0,0,1), kernel_ao_basic(tex_playspace, 0, cmdl_ao_size) * 0.9);      // AO
 
-       final = blend_normal(final, outline_color, kernel_filter_outline(tex_playspace, 3, 2));                                         // Outline
+       if(cmdl_outline_enable == 1) final = blend_normal(final, outline_color, kernel_filter_outline(tex_playspace, 3, cmdl_outline_size));                                            // Outline
 
        final = blend_normal(final, objective_color,                                                                                                                            // Objectives
                (kernel_filter_glow(tex_objectives, 0, 16, 1) * sObjectives.r) + 
index f0dad97dbeb267d2b0493b2f066f65db99f378c3..0ae2cf0bd3bbec4c60bf2d5aac4181e72da20f66 100644 (file)
@@ -1,4 +1,4 @@
-@PointClass base(Targetname) iconsprite("tar/editor/tar_config.vmt") = tar_config : 
+@PointClass iconsprite("tar/editor/tar_config.vmt") = tar_config : 
        "Configuration entity for Terri's Auto Radar"
 [
        // HB Color
                7: "Custom Scheme"
        ]
        
-       customCol0(color255) : "Custom low level color" : "39 56 79"
-       customCol1(color255) : "Custom middle level color" : "77 74 72"
-       customCol2(color255) : "Custom high level color" : "178 113 65"
+       customCol0(color255) : "Custom low level color" : "39 56 79" : "What the color of the radar should be at the lowest points of the map"
+       customCol1(color255) : "Custom middle level color" : "77 74 72" : "What the color of the radar should be in the middle of the map"
+       customCol2(color255) : "Custom high level color" : "178 113 65" : "What the color of the radar should be at the heighest points of the map"
        
        // Ambient occlusion
        
-       enableAO(choices) : "Ambient Occlusion" : 0 =
+       enableAO(choices) : "Ambient Occlusion" : 1 =
        [
-               0: "Enabled"
-               1: "Disabled"
+               0: "Disabled"
+               1: "Enabled"
        ]
        
-       aoSize(float) : "Ambient Occlusion Size" : "16"
+       aoSize(float) : "Ambient Occlusion Size" : "8" : "How far should ambient occlusion sample (use values between 2 and 128)"
        
        // Shadows
        
-       enableAO(choices) : "Shadows" : 1 =
+       enableShadows(choices) : "Shadows" : 0 =
        [
-               0: "Enabled"
-               1: "Disabled"
+               0: "Disabled"
+               1: "Enabled"
        ]
+       
+       // Outline
+       
+       enableOutline(choices) : "Outline" : 0 = 
+       [
+               0: "Disabled"
+               1: "Enabled"
+       ]
+       
+       outlineWidth(float) : "Outline width" : "2" : "How big should the outline be"
+       
+       // Visgroup specifiers
+       vgroup_layout(string) : "Visgroup: Layout" : "tar_layout" : "Name of the visgroup that specifies the layout of the map"
+       vgroup_negative(string) : "Visgroup: Mask" : "tar_mask" : "Name of the visgroup that specifies subtractive brushes of the maps layout (use on walls)"
+       vgroup_cover(string) : "Visgroup: Cover" : "tar_cover" : "Name of the visgroup that specifies the cover of the map. Chuck all yr crates in here"
+]
+
+@PointClass iconsprite("tar/editor/tar_min.vmt") = tar_min : 
+       "Overrides the minimum height of the map"
+[
+
+]
+
+@PointClass iconsprite("tar/editor/tar_max.vmt") = tar_max : 
+       "Overrides the maximum height of the map"
+[
+
 ]
\ No newline at end of file
diff --git a/tar_entities/tar_max.png b/tar_entities/tar_max.png
new file mode 100644 (file)
index 0000000..c7dd5b0
Binary files /dev/null and b/tar_entities/tar_max.png differ
diff --git a/tar_entities/tar_max.psd b/tar_entities/tar_max.psd
new file mode 100644 (file)
index 0000000..c7fc453
Binary files /dev/null and b/tar_entities/tar_max.psd differ
diff --git a/tar_entities/tar_max.vmt b/tar_entities/tar_max.vmt
new file mode 100644 (file)
index 0000000..c1ff064
--- /dev/null
@@ -0,0 +1,7 @@
+"Sprite"
+{
+       "$spriteorientation" "vp_parallel"
+       "$spriteorigin" "[ 0.50 0.50 ]"
+       "$basetexture" "tar/editor/tar_max"
+       "$no_fullbright" 1
+}
\ No newline at end of file
diff --git a/tar_entities/tar_max.vtf b/tar_entities/tar_max.vtf
new file mode 100644 (file)
index 0000000..1a3d7bc
Binary files /dev/null and b/tar_entities/tar_max.vtf differ
diff --git a/tar_entities/tar_min.png b/tar_entities/tar_min.png
new file mode 100644 (file)
index 0000000..4d81df6
Binary files /dev/null and b/tar_entities/tar_min.png differ
diff --git a/tar_entities/tar_min.psd b/tar_entities/tar_min.psd
new file mode 100644 (file)
index 0000000..b7a10d0
Binary files /dev/null and b/tar_entities/tar_min.psd differ
diff --git a/tar_entities/tar_min.vmt b/tar_entities/tar_min.vmt
new file mode 100644 (file)
index 0000000..fb4f3ef
--- /dev/null
@@ -0,0 +1,7 @@
+"Sprite"
+{
+       "$spriteorientation" "vp_parallel"
+       "$spriteorigin" "[ 0.50 0.50 ]"
+       "$basetexture" "tar/editor/tar_min"
+       "$no_fullbright" 1
+}
\ No newline at end of file
diff --git a/tar_entities/tar_min.vtf b/tar_entities/tar_min.vtf
new file mode 100644 (file)
index 0000000..2ce4826
Binary files /dev/null and b/tar_entities/tar_min.vtf differ