From 21ca133e3012cf1bc1234b4512c28faf9599902a Mon Sep 17 00:00:00 2001 From: Kearwood Gilbert Date: Sun, 1 Dec 2019 16:38:50 -0800 Subject: [PATCH] Removed old shaders and asset folders --- .../Resources-Info.plist | 46 -- .../Shaders/ObjectShader.fsh | 423 ----------------- .../Shaders/ObjectShader.vsh | 344 -------------- .../Shaders/PostShader.fsh | 195 -------- .../Shaders/PostShader.vsh | 38 -- .../Shaders/ShadowShader.fsh | 33 -- .../Shaders/ShadowShader.vsh | 47 -- .../Shaders/debug_font.fsh | 37 -- .../Shaders/debug_font.vsh | 38 -- .../Shaders/dust_particle.fsh | 43 -- .../Shaders/dust_particle.vsh | 57 --- kraken_standard_assets_ios/Shaders/flare.fsh | 38 -- kraken_standard_assets_ios/Shaders/flare.vsh | 42 -- .../Shaders/light_directional.fsh | 60 --- .../Shaders/light_directional.vsh | 33 -- .../Shaders/light_point.fsh | 73 --- .../Shaders/light_point.vsh | 35 -- .../Shaders/light_point_inside.fsh | 73 --- .../Shaders/light_point_inside.vsh | 33 -- .../Shaders/occlusion_test.fsh | 34 -- .../Shaders/occlusion_test.vsh | 34 -- .../Shaders/simple_blit.fsh | 35 -- .../Shaders/simple_blit.vsh | 38 -- .../Shaders/sky_box.fsh | 38 -- .../Shaders/sky_box.vsh | 49 -- kraken_standard_assets_ios/Shaders/sprite.fsh | 38 -- kraken_standard_assets_ios/Shaders/sprite.vsh | 41 -- .../Shaders/visualize_overlay.fsh | 35 -- .../Shaders/visualize_overlay.vsh | 38 -- .../Shaders/volumetric_fog.fsh | 37 -- .../Shaders/volumetric_fog.vsh | 51 --- .../Shaders/volumetric_fog_downsampled.fsh | 41 -- .../Shaders/volumetric_fog_downsampled.vsh | 50 --- kraken_standard_assets_ios/font.pvr | Bin 43828 -> 0 bytes .../Resources-Info.plist | 46 -- .../Shaders/ObjectShader_osx.fsh | 425 ------------------ .../Shaders/ObjectShader_osx.vsh | 344 -------------- .../Shaders/PostShader_osx.fsh | 190 -------- .../Shaders/PostShader_osx.vsh | 38 -- .../Shaders/ShadowShader_osx.fsh | 35 -- .../Shaders/ShadowShader_osx.vsh | 47 -- .../Shaders/debug_font_osx.fsh | 38 -- .../Shaders/debug_font_osx.vsh | 38 -- .../Shaders/dust_particle_osx.fsh | 45 -- .../Shaders/dust_particle_osx.vsh | 57 --- .../Shaders/flare_osx.fsh | 40 -- .../Shaders/flare_osx.vsh | 42 -- .../Shaders/light_directional_osx.fsh | 61 --- .../Shaders/light_directional_osx.vsh | 33 -- .../Shaders/light_point_inside_osx.fsh | 74 --- .../Shaders/light_point_inside_osx.vsh | 33 -- .../Shaders/light_point_osx.fsh | 74 --- .../Shaders/light_point_osx.vsh | 35 -- .../Shaders/occlusion_test_osx.fsh | 37 -- .../Shaders/occlusion_test_osx.vsh | 34 -- .../Shaders/simple_blit_osx.fsh | 37 -- .../Shaders/simple_blit_osx.vsh | 38 -- .../Shaders/sky_box_osx.fsh | 40 -- .../Shaders/sky_box_osx.vsh | 46 -- .../Shaders/sprite_osx.fsh | 40 -- .../Shaders/sprite_osx.vsh | 41 -- .../Shaders/visualize_overlay_osx.fsh | 37 -- .../Shaders/visualize_overlay_osx.vsh | 38 -- .../volumetric_fog_downsampled_osx.fsh | 41 -- .../volumetric_fog_downsampled_osx.vsh | 50 --- .../Shaders/volumetric_fog_osx.fsh | 37 -- .../Shaders/volumetric_fog_osx.vsh | 51 --- .../Resources-Info.plist | 46 -- standard_assets/shaders/frag.spv | Bin 672 -> 0 bytes 69 files changed, 4555 deletions(-) delete mode 100755 kraken_standard_assets_ios/Resources-Info.plist delete mode 100755 kraken_standard_assets_ios/Shaders/ObjectShader.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/ObjectShader.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/PostShader.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/PostShader.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/ShadowShader.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/ShadowShader.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/debug_font.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/debug_font.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/dust_particle.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/dust_particle.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/flare.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/flare.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/light_directional.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/light_directional.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/light_point.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/light_point.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/light_point_inside.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/light_point_inside.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/occlusion_test.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/occlusion_test.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/simple_blit.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/simple_blit.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/sky_box.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/sky_box.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/sprite.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/sprite.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/visualize_overlay.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/visualize_overlay.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/volumetric_fog.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/volumetric_fog.vsh delete mode 100755 kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.fsh delete mode 100755 kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.vsh delete mode 100755 kraken_standard_assets_ios/font.pvr delete mode 100755 kraken_standard_assets_osx/Resources-Info.plist delete mode 100755 kraken_standard_assets_osx/Shaders/ObjectShader_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/ObjectShader_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/PostShader_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/PostShader_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/ShadowShader_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/ShadowShader_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/debug_font_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/debug_font_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/dust_particle_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/dust_particle_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/flare_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/flare_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/light_directional_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/light_directional_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/light_point_inside_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/light_point_inside_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/light_point_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/light_point_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/occlusion_test_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/occlusion_test_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/simple_blit_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/simple_blit_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/sky_box_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/sky_box_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/sprite_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/sprite_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/visualize_overlay_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/visualize_overlay_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.vsh delete mode 100755 kraken_standard_assets_osx/Shaders/volumetric_fog_osx.fsh delete mode 100755 kraken_standard_assets_osx/Shaders/volumetric_fog_osx.vsh delete mode 100755 kraken_standard_assets_tvos/Resources-Info.plist delete mode 100644 standard_assets/shaders/frag.spv diff --git a/kraken_standard_assets_ios/Resources-Info.plist b/kraken_standard_assets_ios/Resources-Info.plist deleted file mode 100755 index c71a54e..0000000 --- a/kraken_standard_assets_ios/Resources-Info.plist +++ /dev/null @@ -1,46 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - - 00000000-0000-0000-0000-000000000000 - MyFactoryFunction - - CFPlugInTypes - - 00000000-0000-0000-0000-000000000000 - - 00000000-0000-0000-0000-000000000000 - - - CFPlugInUnloadFunction - - NSHumanReadableCopyright - Copyright © 2013 Kearwood Software. All rights reserved. - - diff --git a/kraken_standard_assets_ios/Shaders/ObjectShader.fsh b/kraken_standard_assets_ios/Shaders/ObjectShader.fsh deleted file mode 100755 index 47ef5e7..0000000 --- a/kraken_standard_assets_ios/Shaders/ObjectShader.fsh +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#extension GL_EXT_shadow_samplers : require - -#if ENABLE_RIM_COLOR == 1 - uniform lowp vec3 rim_color; - uniform mediump float rim_power; -#endif - -#if FOG_TYPE > 0 - // FOG_TYPE 1 - Linear - // FOG_TYPE 2 - Exponential - // FOG_TYPE 3 - Exponential squared - uniform lowp vec3 fog_color; - uniform mediump float fog_near; - #if FOG_TYPE == 1 - uniform mediump float fog_far; - uniform mediump float fog_scale; - #endif - - #if FOG_TYPE > 1 - uniform mediump float fog_density; - #endif - - #if FOG_TYPE == 2 - uniform mediump float fog_density_premultiplied_exponential; - #endif - #if FOG_TYPE == 3 - uniform mediump float fog_density_premultiplied_squared; - #endif -#endif - - -#if ENABLE_PER_PIXEL == 1 || GBUFFER_PASS == 1 - uniform mediump float material_shininess; - #if HAS_NORMAL_MAP == 1 - uniform sampler2D normalTexture; - #else - varying mediump vec3 normal; - #endif - - #if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1 - varying highp vec2 texCoord; - #endif - #if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1 - varying highp vec2 normal_uv; - #else - #define normal_uv texCoord - #endif -#else - #if HAS_DIFFUSE_MAP == 1 - varying highp vec2 texCoord; - #endif -#endif - - -#if GBUFFER_PASS == 3 - uniform sampler2D gbuffer_frame; - uniform sampler2D gbuffer_depth; -#endif - -#if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - varying highp mat3 tangent_to_view_matrix; - #else - uniform highp mat4 model_view_inverse_transpose_matrix; - #endif - - #if HAS_DIFFUSE_MAP == 1 && ALPHA_TEST == 1 - uniform sampler2D diffuseTexture; - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - varying highp vec2 diffuse_uv; - #else - #define diffuse_uv texCoord - #endif - #endif -#else - uniform lowp vec3 material_ambient, material_diffuse, material_specular; - uniform lowp float material_alpha; - - - #if HAS_DIFFUSE_MAP == 1 - uniform sampler2D diffuseTexture; - #endif - - #if HAS_SPEC_MAP == 1 - uniform sampler2D specularTexture; - #endif - - #if HAS_REFLECTION_MAP == 1 - uniform sampler2D reflectionTexture; - #endif - - #if ENABLE_RIM_COLOR == 1 - #define NEED_EYEVEC - #endif - - #if HAS_REFLECTION_CUBE_MAP == 1 - uniform lowp vec3 material_reflection; - uniform samplerCube reflectionCubeTexture; - #if HAS_NORMAL_MAP == 1 - varying highp mat3 tangent_to_world_matrix; - #define NEED_EYEVEC - - uniform highp mat4 model_matrix; - #else - varying mediump vec3 reflectionVec; - #endif - #endif - - #ifdef NEED_EYEVEC - varying mediump vec3 eyeVec; - #endif - - - #if SHADOW_QUALITY >= 1 - #ifdef GL_EXT_shadow_samplers - uniform sampler2DShadow shadowTexture1; - #else - uniform sampler2D shadowTexture1; - #endif - varying highp vec4 shadowMapCoord1; - #endif - - #if HAS_LIGHT_MAP == 1 - uniform sampler2D lightmapTexture; - varying mediump vec2 lightmap_uv; - #endif - - #if SHADOW_QUALITY >= 2 - uniform sampler2D shadowTexture2; - varying highp vec4 shadowMapCoord2; - #endif - - #if SHADOW_QUALITY >= 3 - uniform sampler2D shadowTexture3; - varying highp vec4 shadowMapCoord3; - #endif - - #if ENABLE_PER_PIXEL == 1 - varying mediump vec3 lightVec; - varying mediump vec3 halfVec; - #else - varying mediump float lamberFactor; - varying mediump float specularFactor; - #endif - - #if (HAS_SPEC_MAP_OFFSET == 1|| HAS_SPEC_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 - varying mediump vec2 spec_uv; - #else - #define spec_uv texCoord - #endif - - #if (HAS_REFLECTION_MAP_OFFSET == 1|| HAS_REFLECTION_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 - varying mediump vec2 reflection_uv; - #else - #define reflection_uv texCoord - #endif - - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - varying highp vec2 diffuse_uv; - #else - #define diffuse_uv texCoord - #endif - -#endif - -#if GBUFFER_PASS == 1 || GBUFFER_PASS == 3 - uniform mediump vec4 viewport; -#endif - -void main() -{ - #if ALPHA_TEST == 1 && HAS_DIFFUSE_MAP == 1 - mediump vec4 diffuseMaterial = texture2D(diffuseTexture, diffuse_uv); - if(diffuseMaterial.a < 0.5) discard; - #endif - - #if GBUFFER_PASS == 1 && ALPHA_TEST == 1 - if(texture2D(diffuseTexture, diffuse_uv).a < 0.5) discard; - #endif - - #if GBUFFER_PASS == 2 || GBUFFER_PASS == 3 - mediump vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - #endif - - #if GBUFFER_PASS == 3 - lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); - mediump vec3 gbuffer_lamber_factor = gbuffer_sample.rgb * 5.0; - lowp float gbuffer_specular_factor = gbuffer_sample.a; - #endif - - #if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - // lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize - mediump vec3 normal = normalize(2.0 * texture2D(normalTexture,normal_uv).rgb - 1.0); - mediump vec3 view_space_normal = tangent_to_view_matrix * normal; - #else - mediump vec3 view_space_normal = vec3(model_view_inverse_transpose_matrix * vec4(normal, 1.0)); - #endif - gl_FragColor = vec4(view_space_normal * 0.5 + 0.5, material_shininess / 100.0); - #else - #if HAS_DIFFUSE_MAP == 1 - #if ALPHA_TEST == 1 - diffuseMaterial.a = 1.0; - #else - mediump vec4 diffuseMaterial = texture2D(diffuseTexture, diffuse_uv); - #endif - - #else - mediump vec4 diffuseMaterial = vec4(1.0); - #endif - - #if ENABLE_PER_PIXEL == 1 - #if HAS_NORMAL_MAP == 1 - // lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize - mediump vec3 normal = normalize(2.0 * texture2D(normalTexture,normal_uv).rgb - 1.0); - #endif - - #if GBUFFER_PASS == 3 - mediump vec3 lamberFactor = gbuffer_lamber_factor; - #else - mediump float lamberFactor = max(0.0,dot(lightVec, normal)); - #endif - mediump float specularFactor = 0.0; - if(material_shininess > 0.0) { - #if GBUFFER_PASS == 3 - specularFactor = gbuffer_specular_factor; - #else - mediump float halfVecDot = dot(halfVec,normal); - if(halfVecDot > 0.0) { - specularFactor = max(0.0,pow(halfVecDot, material_shininess)); - } - #endif - } - - #ifdef GL_EXT_shadow_samplers - #if SHADOW_QUALITY == 1 - lowp float shadow = shadow2DProjEXT(shadowTexture1, shadowMapCoord1); - lamberFactor *= shadow; - specularFactor *= shadow; - #endif - #else - - #if SHADOW_QUALITY == 1 - - highp float shadowMapDepth = 1.0; - highp float vertexShadowDepth = 1.0; - highp vec2 shadowMapPos = (shadowMapCoord1 / shadowMapCoord1.w).st; - - if(shadowMapCoord1.x >= -1.0 && shadowMapCoord1.x <= 1.0 && shadowMapCoord1.y >= -1.0 && shadowMapCoord1.y <= 1.0 && shadowMapCoord1.z >= 0.0 && shadowMapCoord1.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5, 0.0); - #endif - shadowMapDepth = texture2D(shadowTexture1, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z; - } - #endif - - #if SHADOW_QUALITY >= 2 - - highp float shadowMapDepth = 1.0; - highp float vertexShadowDepth = 1.0; - - if(shadowMapCoord1.x >= -1.0 && shadowMapCoord1.x <= 1.0 && shadowMapCoord1.y >= -1.0 && shadowMapCoord1.y <= 1.0 && shadowMapCoord1.z >= 0.0 && shadowMapCoord1.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5 * diffuseMaterial.a, 0.0); - #endif - highp vec2 shadowMapPos = (shadowMapCoord1 / shadowMapCoord1.w).st; - shadowMapDepth = texture2D(shadowTexture1, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z; - } else if(shadowMapCoord2.s >= -1.0 && shadowMapCoord2.s <= 1.0 && shadowMapCoord2.t >= -1.0 && shadowMapCoord2.t <= 1.0 && shadowMapCoord2.z >= 0.0 && shadowMapCoord2.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.75, 0.50, 0.75, 1.0) + vec4(0.0, 0.5 * diffuseMaterial.a, 0.0, 0.0); - #endif - highp vec2 shadowMapPos = (shadowMapCoord2 / shadowMapCoord2.w).st; - shadowMapDepth = texture2D(shadowTexture2, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord2 / shadowMapCoord2.w).z; - } - #if SHADOW_QUALITY >= 3 - else if(shadowMapCoord3.s >= -1.0 && shadowMapCoord3.s <= 1.0 && shadowMapCoord3.t >= -1.0 && shadowMapCoord3.t <= 1.0 && shadowMapCoord3.z >= 0.0 && shadowMapCoord3.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.50, 0.75, 0.75, 1.0) + vec4(0.5 * diffuseMaterial.a, 0.0, 0.0, 0.0); - #endif - highp vec2 shadowMapPos = (shadowMapCoord3 / shadowMapCoord3.w).st; - shadowMapDepth = texture2D(shadowTexture3, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord3 / shadowMapCoord3.w).z; - } - - #endif - #endif - - #if SHADOW_QUALITY >= 1 - if(vertexShadowDepth >= shadowMapDepth && shadowMapDepth < 1.0) { - #if GBUFFER_PASS == 3 - lamberFactor = vec3(0.0); - #else - lamberFactor = 0.0; - #endif - specularFactor = 0.0; - } - #endif - #endif - #endif - - #if ENABLE_AMBIENT == 1 - // -------------------- Add ambient light and alpha component -------------------- - gl_FragColor = vec4(vec3(diffuseMaterial) * material_ambient, 0.0); - #else - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); - #endif - - #if ENABLE_DIFFUSE == 1 - // -------------------- Add diffuse light -------------------- - gl_FragColor += diffuseMaterial * vec4(material_diffuse * lamberFactor, 1.0); - #endif - - // -------------------- Apply material_alpha -------------------- - - #if ALPHA_BLEND == 1 - gl_FragColor.a = diffuseMaterial.a; - gl_FragColor *= material_alpha; - #endif - - // -------------------- Add specular light -------------------- - // Additive, not masked against diffuse alpha - #if ENABLE_SPECULAR == 1 - #if HAS_SPEC_MAP == 1 && ENABLE_PER_PIXEL == 1 - gl_FragColor.rgb += material_specular * vec3(texture2D(specularTexture, spec_uv)) * specularFactor; - #else - gl_FragColor.rgb += material_specular * specularFactor; - #endif - #endif - - // -------------------- Multiply light map -------------------- - #if HAS_LIGHT_MAP == 1 - mediump vec3 lightMapColor = vec3(texture2D(lightmapTexture, lightmap_uv)); - //gl_FragColor = vec4(gl_FragColor.r * lightMapColor.r, gl_FragColor.g * lightMapColor.g, gl_FragColor.b * lightMapColor.b, gl_FragColor.a); - gl_FragColor.rgb *= lightMapColor; - #endif - - - // -------------------- Add reflected light -------------------- - #if HAS_REFLECTION_CUBE_MAP == 1 - // Reflected light is additive and not modulated by the light map - #if HAS_NORMAL_MAP == 1 - // Calculate reflection vector as I - 2.0 * dot(N, I) * N - mediump vec3 incidenceVec = -normalize(eyeVec); - highp vec3 world_space_normal = tangent_to_world_matrix * normal; - mediump vec3 reflectionVec = mat3(model_matrix) * (incidenceVec - 2.0 * dot(world_space_normal, incidenceVec) * world_space_normal); - #endif - #if HAS_REFLECTION_MAP == 1 - gl_FragColor += vec4(material_reflection, 0.0) * texture2D(reflectionTexture, reflection_uv) * vec4(textureCube(reflectionCubeTexture, reflectionVec).rgb, 1.0); - #else - gl_FragColor += vec4(material_reflection, 0.0) * vec4(textureCube(reflectionCubeTexture, reflectionVec).rgb, 1.0); - #endif - #endif - - // -------------------- Apply Fog -------------------- - #if FOG_TYPE == 1 || FOG_TYPE == 2 || FOG_TYPE == 3 - - #if FOG_TYPE == 1 - // Linear fog - lowp float fog_alpha = clamp((fog_far - gl_FragCoord.z / gl_FragCoord.w) * fog_scale, 0.0, 1.0); - #endif - - #if FOG_TYPE == 2 - // Exponential fog - mediump float fog_z = gl_FragCoord.z / gl_FragCoord.w - fog_near; - lowp float fog_alpha = clamp(exp2(fog_density_premultiplied_exponential * fog_z), 0.0, 1.0); - #endif - - #if FOG_TYPE == 3 - // Exponential squared fog - mediump float fog_z = max(gl_FragCoord.z / gl_FragCoord.w - fog_near, 0.0); - lowp float fog_alpha = clamp(exp2(fog_density_premultiplied_squared * fog_z * fog_z), 0.0, 1.0); - #endif - - #if ALPHA_BLEND == 1 - gl_FragColor.rgb = mix(fog_color.rgb * gl_FragColor.a, gl_FragColor.rgb, fog_alpha); - #else - gl_FragColor.rgb = mix(fog_color.rgb, gl_FragColor.rgb, fog_alpha); - #endif - #endif - - - #endif - - #if ENABLE_RIM_COLOR == 1 - lowp float rim = 1.0 - clamp(dot(normalize(eyeVec), normal), 0.0, 1.0); - - gl_FragColor += vec4(rim_color, 1.0) * pow(rim, rim_power); - #endif - - #if BONE_COUNT > 0 - gl_FragColor.b = 1.0; - #endif -} diff --git a/kraken_standard_assets_ios/Shaders/ObjectShader.vsh b/kraken_standard_assets_ios/Shaders/ObjectShader.vsh deleted file mode 100755 index 904a3a4..0000000 --- a/kraken_standard_assets_ios/Shaders/ObjectShader.vsh +++ /dev/null @@ -1,344 +0,0 @@ -// -// Shader.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - - -attribute highp vec3 vertex_position, vertex_normal; -#if HAS_NORMAL_MAP == 1 - attribute highp vec3 vertex_tangent; -#endif -attribute mediump vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -#if BONE_COUNT > 0 - attribute highp vec4 bone_weights; - attribute highp vec4 bone_indexes; - uniform highp mat4 bone_transforms[BONE_COUNT]; -#else - #define vertex_position_skinned vertex_position - #define vertex_normal_skinned vertex_normal - #define vertex_tangent_skinned vertex_tangent -#endif - - - -#if ENABLE_PER_PIXEL == 1 || GBUFFER_PASS == 1 - #if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1 - varying highp vec2 texCoord; - #endif - #if HAS_NORMAL_MAP == 1 - #if HAS_NORMAL_MAP_SCALE == 1 - uniform highp vec2 normalTexture_Scale; - #endif - - #if HAS_NORMAL_MAP_OFFSET == 1 - uniform highp vec2 normalTexture_Offset; - #endif - - #if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1 - varying highp vec2 normal_uv; - #endif - #else - varying mediump vec3 normal; - #endif -#else - uniform mediump float material_shininess; - #if HAS_DIFFUSE_MAP == 1 - varying highp vec2 texCoord; - #endif -#endif - -#if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - uniform highp mat4 model_view_inverse_transpose_matrix; - varying highp mat3 tangent_to_view_matrix; - #endif -#else - - uniform highp vec3 light_direction_model_space; // Must be normalized before entering shader - uniform highp vec3 camera_position_model_space; - - #if HAS_LIGHT_MAP == 1 - attribute mediump vec2 vertex_lightmap_uv; - varying mediump vec2 lightmap_uv; - #endif - - #if ENABLE_PER_PIXEL == 1 - varying mediump vec3 lightVec; - varying mediump vec3 halfVec; - - #if HAS_SPEC_MAP_OFFSET == 1 || HAS_SPEC_MAP_SCALE == 1 - varying highp vec2 spec_uv; - #endif - - #if HAS_SPEC_MAP_SCALE == 1 - uniform highp vec2 specularTexture_Scale; - #endif - - #if HAS_SPEC_MAP_OFFSET == 1 - uniform highp vec2 specularTexture_Offset; - #endif - - #if HAS_REFLECTION_MAP_OFFSET == 1 || HAS_REFLECTION_MAP_SCALE == 1 - varying highp vec2 reflection_uv; - #endif - - #if HAS_REFLECTION_MAP_SCALE == 1 - uniform highp vec2 reflectionTexture_Scale; - #endif - - #if HAS_REFLECTION_MAP_OFFSET == 1 - uniform highp vec2 reflectionTexture_Offset; - #endif - - #if SHADOW_QUALITY >= 1 - uniform highp mat4 shadow_mvp1; - varying highp vec4 shadowMapCoord1; - #endif - - #if SHADOW_QUALITY >= 2 - uniform highp mat4 shadow_mvp2; - varying highp vec4 shadowMapCoord2; - #endif - - #if SHADOW_QUALITY >= 3 - uniform highp mat4 shadow_mvp3; - varying highp vec4 shadowMapCoord3; - #endif - - #else - varying mediump float lamberFactor; - varying mediump float specularFactor; - #endif - - #if ENABLE_RIM_COLOR == 1 - #define NEED_EYEVEC - #endif - - #if HAS_REFLECTION_CUBE_MAP == 1 - #if HAS_NORMAL_MAP == 1 - #define NEED_EYEVEC - uniform highp mat4 model_inverse_transpose_matrix; - varying highp mat3 tangent_to_world_matrix; - #else - uniform highp mat4 model_matrix; - varying mediump vec3 reflectionVec; - #endif - #endif - - #ifdef NEED_EYEVEC - varying mediump vec3 eyeVec; - #endif - - #if HAS_DIFFUSE_MAP_SCALE == 1 - uniform highp vec2 diffuseTexture_Scale; - #endif - - #if HAS_DIFFUSE_MAP_OFFSET == 1 - uniform highp vec2 diffuseTexture_Offset; - #endif - - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - varying highp vec2 diffuse_uv; - #endif - -#endif - - - -void main() -{ -#if BONE_COUNT > 0 - mediump vec4 scaled_bone_indexes = bone_indexes; - mediump vec4 scaled_bone_weights = bone_weights; - - //scaled_bone_indexes = vec4(0.0, 0.0, 0.0, 0.0); - //scaled_bone_weights = vec4(1.0, 0.0, 0.0, 0.0); - - highp mat4 skin_matrix = - bone_transforms[ int(scaled_bone_indexes.x) ] * scaled_bone_weights.x + - bone_transforms[ int(scaled_bone_indexes.y) ] * scaled_bone_weights.y + - bone_transforms[ int(scaled_bone_indexes.z) ] * scaled_bone_weights.z + - bone_transforms[ int(scaled_bone_indexes.w) ] * scaled_bone_weights.w; - //skin_matrix = bone_transforms[0]; - highp vec3 vertex_position_skinned = (skin_matrix * vec4(vertex_position, 1)).xyz; - - highp vec3 vertex_normal_skinned = normalize(mat3(skin_matrix) * vertex_normal); - #if HAS_NORMAL_MAP == 1 - highp vec3 vertex_tangent_skinned = normalize(mat3(skin_matrix) * vertex_tangent); - #endif - -#endif - - // Transform position - gl_Position = mvp_matrix * vec4(vertex_position_skinned,1.0); - - - - #if HAS_DIFFUSE_MAP == 1 || (HAS_NORMAL_MAP == 1 && ENABLE_PER_PIXEL == 1) || (HAS_SPEC_MAP == 1 && ENABLE_PER_PIXEL == 1) || (HAS_REFLECTION_MAP == 1 && ENABLE_PER_PIXEL == 1) - // Pass UV co-ordinates - texCoord = vertex_uv.st; - #endif - - - - - // Scaled and translated normal map UV's - #if (HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 - normal_uv = texCoord; - - #if HAS_NORMAL_MAP_OFFSET == 1 - normal_uv += normalTexture_Offset; - #endif - - #if HAS_NORMAL_MAP_SCALE == 1 - normal_uv *= normalTexture_Scale; - #endif - - #endif - - #if GBUFFER_PASS != 1 || ALPHA_TEST == 1 - // Scaled and translated diffuse map UV's - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - diffuse_uv = texCoord; - - #if HAS_DIFFUSE_MAP_OFFSET == 1 - diffuse_uv += diffuseTexture_Offset; - #endif - - #if HAS_DIFFUSE_MAP_SCALE == 1 - diffuse_uv *= diffuseTexture_Scale; - #endif - #endif - #endif - - - #if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - mediump vec3 a_bitangent = cross(vertex_normal_skinned, vertex_tangent_skinned); - tangent_to_view_matrix[0] = vec3(model_view_inverse_transpose_matrix * vec4(vertex_tangent_skinned, 1.0)); - tangent_to_view_matrix[1] = vec3(model_view_inverse_transpose_matrix * vec4(a_bitangent, 1.0)); - tangent_to_view_matrix[2] = vec3(model_view_inverse_transpose_matrix * vec4(vertex_normal_skinned, 1.0)); - #else - normal = vertex_normal_skinned; - #endif - #else - - #if HAS_REFLECTION_CUBE_MAP == 1 - #if HAS_NORMAL_MAP == 1 - - #else - // Calculate reflection vector as I - 2.0 * dot(N, I) * N - mediump vec3 eyeVec = normalize(camera_position_model_space - vertex_position_skinned); - mediump vec3 incidenceVec = -eyeVec; - reflectionVec = mat3(model_matrix) * (incidenceVec - 2.0 * dot(vertex_normal_skinned, incidenceVec) * vertex_normal_skinned); - #endif - #endif - - #ifdef NEED_EYEVEC - eyeVec = normalize(camera_position_model_space - vertex_position_skinned); - #endif - - #if HAS_LIGHT_MAP == 1 - // Pass shadow UV co-ordinates - lightmap_uv = vertex_lightmap_uv.st; - #endif - - - - #if ENABLE_PER_PIXEL == 1 - // Scaled and translated specular map UV's - #if HAS_SPEC_MAP_OFFSET == 1 || HAS_SPEC_MAP_SCALE == 1 - spec_uv = texCoord; - #if HAS_SPEC_MAP_OFFSET == 1 - spec_uv += specularTexture_Offset; - #endif - - #if HAS_SPEC_MAP_SCALE == 1 - spec_uv *= specularTexture_Scale; - #endif - #endif - - // Scaled and translated reflection map UV's - #if HAS_REFLECTION_MAP_OFFSET == 1 || HAS_REFLECTION_MAP_SCALE == 1 - reflection_uv = texCoord; - #if HAS_REFLECTION_MAP_OFFSET == 1 - reflection_uv += reflectionTexture_Offset; - #endif - - #if HAS_REFLECTION_MAP_SCALE == 1 - reflection_uv *= reflectionTexture_Scale; - #endif - #endif - - - #if SHADOW_QUALITY >= 1 - shadowMapCoord1 = shadow_mvp1 * vec4(vertex_position_skinned,1.0); - #endif - - #if SHADOW_QUALITY >= 2 - shadowMapCoord2 = shadow_mvp2 * vec4(vertex_position_skinned,1.0); - #endif - - #if SHADOW_QUALITY >= 3 - shadowMapCoord3 = shadow_mvp3 * vec4(vertex_position_skinned,1.0); - #endif - - // ----------- Directional Light (Sun) ----------- - #if HAS_NORMAL_MAP == 1 - // ----- Calculate per-pixel lighting in tangent space, for normal mapping ------ - mediump vec3 a_bitangent = cross(vertex_normal_skinned, vertex_tangent_skinned); - #if HAS_REFLECTION_CUBE_MAP == 0 - // The cube map reflections also require an eyeVec as a varying attribute when normal mapping, so only re-calculate here when needed - mediump vec3 eyeVec = normalize(camera_position_model_space - vertex_position_skinned); - #else - tangent_to_world_matrix[0] = vec3(model_inverse_transpose_matrix * vec4(vertex_tangent_skinned, 1.0)); - tangent_to_world_matrix[1] = vec3(model_inverse_transpose_matrix * vec4(a_bitangent, 1.0)); - tangent_to_world_matrix[2] = vec3(model_inverse_transpose_matrix * vec4(vertex_normal_skinned, 1.0)); - #endif - - lightVec = normalize(vec3(dot(light_direction_model_space, vertex_tangent_skinned), dot(light_direction_model_space, a_bitangent), dot(light_direction_model_space, vertex_normal_skinned))); - halfVec = normalize(vec3(dot(eyeVec, vertex_tangent_skinned), dot(eyeVec, a_bitangent), dot(eyeVec, vertex_normal_skinned))); - halfVec = normalize(halfVec + lightVec); // Normalizing anyways, no need to divide by 2 - #else - // ------ Calculate per-pixel lighting without normal mapping ------ - normal = vertex_normal_skinned; - lightVec = light_direction_model_space; - halfVec = normalize((normalize(camera_position_model_space - vertex_position_skinned) + lightVec)); // Normalizing anyways, no need to divide by 2 - #endif - #else - - // ------ Calculate per-vertex lighting ------ - mediump vec3 halfVec = normalize((normalize(camera_position_model_space - vertex_position_skinned) + light_direction_model_space)); // Normalizing anyways, no need to divide by 2 - lamberFactor = max(0.0,dot(light_direction_model_space, vertex_normal_skinned)); - specularFactor = max(0.0,pow(dot(halfVec,vertex_normal_skinned), material_shininess)); - #endif - #endif -} diff --git a/kraken_standard_assets_ios/Shaders/PostShader.fsh b/kraken_standard_assets_ios/Shaders/PostShader.fsh deleted file mode 100755 index b11df0c..0000000 --- a/kraken_standard_assets_ios/Shaders/PostShader.fsh +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#define ENABLE_VIDEO_BG 0 -#define PIXEL_SHIFT_1 0.001 -#define PIXEL_SHIFT_2 0.002 -#define PIXEL_SHIFT_3 0.003 -#define PIXEL_SHIFT_4 0.004 - -varying mediump vec2 textureCoordinate; -precision lowp float; - -#if ENABLE_VIDEO_BG == 1 -uniform lowp sampler2D videoFrame; -#endif - -#if ENABLE_FADE_COLOR == 1 -uniform lowp vec4 fade_color; -#endif - -uniform lowp sampler2D renderFrame; -uniform lowp sampler2D depthFrame; - -#if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1 -uniform lowp sampler2D volumetricEnvironmentFrame; -#endif - -void main() -{ - - lowp vec4 renderColor = texture2D(renderFrame, textureCoordinate); -#if DOF_QUALITY > 0 || ENABLE_FLASH == 1 - mediump float depth = texture2D(depthFrame, textureCoordinate).r; -#endif - mediump vec4 pixelColor = renderColor; - - -#if DOF_QUALITY == 2 - - // Render high quality circle of confusion - // __XXX__ - // _XXXXX_ - // _XXXXX_ - // _XXXXX_ - // __XXX__ - mediump float cf1 = PIXEL_SHIFT_1; - mediump float cf2 = PIXEL_SHIFT_2; - - mediump float bx1 = textureCoordinate.s + cf1; - mediump float bx2 = textureCoordinate.s + cf2; - mediump float bxm1 = textureCoordinate.s - cf1; - mediump float bxm2 = textureCoordinate.s - cf2; - - mediump float by1 = textureCoordinate.t + cf1; - mediump float by2 = textureCoordinate.t + cf2; - mediump float bym1 = textureCoordinate.t - cf1; - mediump float bym2 = textureCoordinate.t - cf2; - - pixelColor += texture2D(renderFrame, vec2(bx1, textureCoordinate.t)); - pixelColor += texture2D(renderFrame, vec2(bxm1, textureCoordinate.t)); - pixelColor += texture2D(renderFrame, vec2(bx2, textureCoordinate.t)); - pixelColor += texture2D(renderFrame, vec2(bxm2, textureCoordinate.t)); - - pixelColor += texture2D(renderFrame, vec2(textureCoordinate.s, by1)); - pixelColor += texture2D(renderFrame, vec2(bx1, by1)); - pixelColor += texture2D(renderFrame, vec2(bxm1, by1)); - pixelColor += texture2D(renderFrame, vec2(bx2, by1)); - pixelColor += texture2D(renderFrame, vec2(bxm2, by1)); - - pixelColor += texture2D(renderFrame, vec2(textureCoordinate.s, by2)); - pixelColor += texture2D(renderFrame, vec2(bx1, by2)); - pixelColor += texture2D(renderFrame, vec2(bxm1, by2)); - - pixelColor += texture2D(renderFrame, vec2(textureCoordinate.s,bym1)); - pixelColor += texture2D(renderFrame, vec2(bx1,bym1)); - pixelColor += texture2D(renderFrame, vec2(bxm1,bym1)); - pixelColor += texture2D(renderFrame, vec2(bx2,bym1)); - pixelColor += texture2D(renderFrame, vec2(bxm2,bym1)); - - pixelColor += texture2D(renderFrame, vec2(bx1, bym2)); - pixelColor += texture2D(renderFrame, vec2(bx1, bym2)); - pixelColor += texture2D(renderFrame, vec2(bxm1, bym2)); - pixelColor /= 21.0; - -#endif -// DOF_QUALITY == 2 - -#if DOF_QUALITY == 1 - - // Render low quality circle of confusion - // ___X___ - // __XXX__ - // _XXXXX_ - // __XXX__ - // ___X___ - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_2, 0)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, 0)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, 0)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_2, 0)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture2D(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2)); - pixelColor /= 13.0; - -#endif -// DOF_QUALITY == 1 - -#if DOF_QUALITY > 0 - mediump float focusDepth = texture2D(depthFrame, vec2(0.5, 0.5)).r; - mediump float blurAmount = clamp((depth - DOF_DEPTH - focusDepth) / DOF_FALLOFF, 0.0, 1.0); - pixelColor = pixelColor * blurAmount + renderColor * (1.0 - blurAmount); -#endif - - // ---- DEPTH_OF_FIELD END ---- - - - - - // ---- NIGHT_TIME START ---- -#if ENABLE_FLASH == 1 - // Un-comment to enable night time / flash effect - pixelColor *= vec4(vec3(1.0 - clamp((depth - FLASH_DEPTH) / FLASH_FALLOFF, 0.0, 1.0)) * FLASH_INTENSITY, 1.0); - //pixelColor *= vec4(vec3(clamp(1.0 / (depth - FLASH_DEPTH) * FLASH_FALLOFF, 0.0, 1.0) * FLASH_INTENSITY), 1.0); - -#endif - // ---- NIGHT_TIME END ---- - - // ---- VIDEO_BG START ---- - - /* - // Overlay video background - if(depth == 1.0) { - //FILTER COLOR BY CALCULATING PER PIXEL DOT PRODUCT - pixelColor = vec4(dot(vec3(texture2D(videoFrame, textureCoordinate)), vec3(.222, .707, .071))); - } - */ - - // ---- VIDEO_BG END ---- - -#if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1 - pixelColor += texture2D(volumetricEnvironmentFrame, textureCoordinate); -#endif - - - // ---- VIGNETTE START ---- - - // Render vignette effect - -#if ENABLE_VIGNETTE == 1 - pixelColor *= vec4(vec3(clamp(1.0 - (distance(textureCoordinate, vec2(0.5, 0.5)) - VIGNETTE_RADIUS) / VIGNETTE_FALLOFF, 0.0, 1.0)), 1.0); -#endif - // ---- VIGNETTE END ---- - -#if ENABLE_FADE_COLOR == 1 - pixelColor.rgb = mix(pixelColor.rgb, fade_color.rgb, fade_color.a); -#endif - - gl_FragColor = pixelColor; - - - //PASSTHROUGH STATEMENT - // gl_FragColor = texture2D(depthFrame, textureCoordinate); - - //gl_FragColor = vec4(vec3(blurAmount), 1.0); - -} diff --git a/kraken_standard_assets_ios/Shaders/PostShader.vsh b/kraken_standard_assets_ios/Shaders/PostShader.vsh deleted file mode 100755 index c147629..0000000 --- a/kraken_standard_assets_ios/Shaders/PostShader.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -uniform mediump vec2 viewport_downsample; -attribute vec4 vertex_position; -attribute lowp vec4 vertex_uv; - -varying mediump vec2 textureCoordinate; - -void main() -{ - gl_Position = vertex_position; - textureCoordinate = vertex_uv.xy * viewport_downsample.xy; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/ShadowShader.fsh b/kraken_standard_assets_ios/Shaders/ShadowShader.fsh deleted file mode 100755 index 81802b9..0000000 --- a/kraken_standard_assets_ios/Shaders/ShadowShader.fsh +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -//varying mediump vec2 texCoord; - -void main() -{ - gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); -} diff --git a/kraken_standard_assets_ios/Shaders/ShadowShader.vsh b/kraken_standard_assets_ios/Shaders/ShadowShader.vsh deleted file mode 100755 index b8241a0..0000000 --- a/kraken_standard_assets_ios/Shaders/ShadowShader.vsh +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#define SHADOW_BIAS 0.01 - - -attribute highp vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - // Transform position - /* - position = shadow_mvp1 * vec4(vertex_position,1.0); - */ - gl_Position = mvp_matrix * vertex_position; - gl_Position.z += SHADOW_BIAS; - /* - // Pass UV co-ordinates - texCoord = vertex_uv.st; - */ - -} diff --git a/kraken_standard_assets_ios/Shaders/debug_font.fsh b/kraken_standard_assets_ios/Shaders/debug_font.fsh deleted file mode 100755 index 94649da..0000000 --- a/kraken_standard_assets_ios/Shaders/debug_font.fsh +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -varying mediump vec2 textureCoordinate; - -uniform sampler2D diffuseTexture; - -void main() -{ - lowp vec4 font_color = texture2D(diffuseTexture, textureCoordinate); - gl_FragColor = vec4(font_color.r, font_color.g, font_color.b, font_color.r + 0.50); -// gl_FragColor = vec4(textureCoordinate.s, textureCoordinate.t, 0.0, 1.0); -} diff --git a/kraken_standard_assets_ios/Shaders/debug_font.vsh b/kraken_standard_assets_ios/Shaders/debug_font.vsh deleted file mode 100755 index 5d7bdea..0000000 --- a/kraken_standard_assets_ios/Shaders/debug_font.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -varying mediump vec2 textureCoordinate; - -attribute vec4 vertex_position; -attribute lowp vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = /*mvp_matrix * */vertex_position; - textureCoordinate = vertex_uv; -} diff --git a/kraken_standard_assets_ios/Shaders/dust_particle.fsh b/kraken_standard_assets_ios/Shaders/dust_particle.fsh deleted file mode 100755 index 468a31e..0000000 --- a/kraken_standard_assets_ios/Shaders/dust_particle.fsh +++ /dev/null @@ -1,43 +0,0 @@ -// -// dust_particle.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#extension GL_EXT_shadow_samplers : require - -varying mediump vec2 texCoord; - -varying mediump vec4 shadowMapCoord1; -uniform sampler2DShadow shadowTexture1; -uniform mediump vec3 light_color; -varying lowp float intensity_modulate; - -void main() { - gl_FragColor = vec4(light_color, 1.0) * shadow2DProjEXT(shadowTexture1, shadowMapCoord1) * max(1.0 - texCoord.x*texCoord.x-texCoord.y*texCoord.y, 0.0) * intensity_modulate; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/dust_particle.vsh b/kraken_standard_assets_ios/Shaders/dust_particle.vsh deleted file mode 100755 index c49fb87..0000000 --- a/kraken_standard_assets_ios/Shaders/dust_particle.vsh +++ /dev/null @@ -1,57 +0,0 @@ -// -// dust_particle.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute mediump vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices -uniform mediump vec4 viewport; -uniform mediump float flare_size; -attribute vec4 vertex_position; -uniform highp vec3 particle_origin; - -uniform highp mat4 shadow_mvp1; -varying mediump vec4 shadowMapCoord1; - -varying mediump vec2 texCoord; -uniform highp float time_absolute; -varying lowp float intensity_modulate; - -void main() { - highp vec4 offset_center = vertex_position + vec4(particle_origin, 0.0); - offset_center.xyz += vec3(sin((time_absolute + vertex_position.x * 100.0) * 0.05), sin((time_absolute + vertex_position.y * 100.0) * 0.07), sin((time_absolute + vertex_position.z * 100.0) * 0.03)) * 0.05; - offset_center = vec4(mod(offset_center.x + 1.0, 2.0) - 1.0, mod(offset_center.y + 1.0, 2.0) - 1.0, mod(offset_center.z + 1.0, 2.0) - 1.0, 1.0); - highp vec4 particle_center = mvp_matrix * offset_center; - texCoord = vertex_uv * 3.46410161513775; // 3.46410161513775 = 2 * sqrt(3); 1 / (2 * sqrt(3)) is the radius of a circle encompased by a equilateral triangle with a side length of 1. - gl_Position = particle_center + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size; - - shadowMapCoord1 = shadow_mvp1 * offset_center; - - intensity_modulate = sin(time_absolute + mod(vertex_position.x * 100.0, 6.28318530717959)) * 0.5 + 0.5; -} diff --git a/kraken_standard_assets_ios/Shaders/flare.fsh b/kraken_standard_assets_ios/Shaders/flare.fsh deleted file mode 100755 index 7fce713..0000000 --- a/kraken_standard_assets_ios/Shaders/flare.fsh +++ /dev/null @@ -1,38 +0,0 @@ -// -// flare.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -varying mediump vec2 texCoord; -uniform sampler2D diffuseTexture; -uniform lowp float material_alpha; - -void main() { - gl_FragColor = vec4(vec3(texture2D(diffuseTexture, texCoord)), 1.0) * material_alpha; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/flare.vsh b/kraken_standard_assets_ios/Shaders/flare.vsh deleted file mode 100755 index b52bc75..0000000 --- a/kraken_standard_assets_ios/Shaders/flare.vsh +++ /dev/null @@ -1,42 +0,0 @@ -// -// flare.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute mediump vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices -uniform mediump vec4 viewport; -uniform mediump float flare_size; - -varying mediump vec2 texCoord; - -void main() { - texCoord = vertex_uv; - gl_Position = mvp_matrix * vec4(0.0, 0.0, 0.0, 1.0) + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 0.75, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size; -} diff --git a/kraken_standard_assets_ios/Shaders/light_directional.fsh b/kraken_standard_assets_ios/Shaders/light_directional.fsh deleted file mode 100755 index f92a412..0000000 --- a/kraken_standard_assets_ios/Shaders/light_directional.fsh +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - - -uniform sampler2D gbuffer_frame; -uniform sampler2D gbuffer_depth; - -uniform mediump vec3 light_direction_view_space; // Must be normalized and converted to view space before entering shader -uniform lowp vec3 light_color; -uniform highp float light_intensity; -uniform mediump vec4 viewport; - -void main() -{ - lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); - - mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); - mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; - - mediump vec3 view_space_vertex_position = vec3( - ((2.0 * gl_FragCoord.xy) - (2.0 * viewport.xy)) / (viewport.zw) - 1.0, - (2.0 * -texture2D(gbuffer_depth, gbuffer_uv).r - gl_DepthRange.near - gl_DepthRange.far) / (gl_DepthRange.far - gl_DepthRange.near) - ); - - //mediump float lamberFactor = max(0.0,dot(light_direction_view_space, gbuffer_normal)) * 0.2; - mediump float lamberFactor = dot(light_direction_view_space, gbuffer_normal) * 0.2; - - mediump float specularFactor = 0.0; - - mediump vec3 halfVec = normalize((normalize(- view_space_vertex_position) + light_direction_view_space)); // Normalizing anyways, no need to divide by 2 - specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); - - - gl_FragColor = vec4(light_color * lamberFactor, specularFactor) * light_intensity; -} diff --git a/kraken_standard_assets_ios/Shaders/light_directional.vsh b/kraken_standard_assets_ios/Shaders/light_directional.vsh deleted file mode 100755 index 62c7fd9..0000000 --- a/kraken_standard_assets_ios/Shaders/light_directional.vsh +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute vec4 vertex_position; - -void main() -{ - gl_Position = vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/light_point.fsh b/kraken_standard_assets_ios/Shaders/light_point.fsh deleted file mode 100755 index 5c9b4bb..0000000 --- a/kraken_standard_assets_ios/Shaders/light_point.fsh +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - - -uniform sampler2D gbuffer_frame; -uniform sampler2D gbuffer_depth; - -uniform lowp vec3 light_color; -uniform highp float light_intensity; -uniform highp float light_decay_start; -uniform highp float light_cutoff; -uniform mediump vec4 viewport; - -uniform highp mat4 inv_projection_matrix; - -uniform highp vec3 view_space_model_origin; // For point lights, this is the position of the light - -void main() -{ - - lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); - - mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); - mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; - - mediump vec4 clip_space_vertex_position = vec4( - gl_FragCoord.xy / viewport.zw * 2.0 - 1.0, - texture2D(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0, - 1.0 - ); - - - mediump vec4 view_space_vertex_position = inv_projection_matrix * clip_space_vertex_position; - view_space_vertex_position.xyz /= view_space_vertex_position.w; - - mediump float light_distance = max(0.0, distance(view_space_model_origin.xyz, view_space_vertex_position.xyz) - light_decay_start); - mediump float light_attenuation = (light_intensity / ((light_distance + 1.0) * (light_distance + 1.0)) - light_cutoff) / (1.0 - light_cutoff); - mediump vec3 light_vec = normalize(view_space_model_origin.xyz - view_space_vertex_position.xyz); - mediump float lamberFactor = dot(light_vec, gbuffer_normal) * 0.2; - - mediump float specularFactor = 0.0; - //if(gbuffer_specular_exponent > 0.0) { - mediump vec3 halfVec = normalize((normalize(- view_space_vertex_position.xyz) + light_vec)); - specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); - //} - - gl_FragColor = vec4(light_color * lamberFactor, specularFactor) * light_attenuation; -} diff --git a/kraken_standard_assets_ios/Shaders/light_point.vsh b/kraken_standard_assets_ios/Shaders/light_point.vsh deleted file mode 100755 index 14bf865..0000000 --- a/kraken_standard_assets_ios/Shaders/light_point.vsh +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; - gl_Position.z = max(gl_Position.z / gl_Position.w, 0.00) * gl_Position.w; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/light_point_inside.fsh b/kraken_standard_assets_ios/Shaders/light_point_inside.fsh deleted file mode 100755 index f3e9aa1..0000000 --- a/kraken_standard_assets_ios/Shaders/light_point_inside.fsh +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - - -uniform sampler2D gbuffer_frame; -uniform sampler2D gbuffer_depth; - -uniform lowp vec3 light_color; -uniform highp float light_intensity; -uniform highp float light_decay_start; -uniform highp float light_cutoff; -uniform mediump vec4 viewport; - -uniform highp mat4 inv_projection_matrix; - -uniform highp vec3 view_space_model_origin; - -void main() -{ - - lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - lowp vec4 gbuffer_sample = texture2D(gbuffer_frame, gbuffer_uv); - - mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); - mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; - - mediump vec4 clip_space_vertex_position = vec4( - gl_FragCoord.xy / viewport.zw * 2.0 - 1.0, - texture2D(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0, - 1.0 - ); - - - mediump vec4 view_space_vertex_position = inv_projection_matrix * clip_space_vertex_position; - view_space_vertex_position.xyz /= view_space_vertex_position.w; - - mediump float light_distance = max(0.0, distance(view_space_model_origin.xyz, view_space_vertex_position.xyz) - light_decay_start); - mediump float light_attenuation = (light_intensity / ((light_distance + 1.0) * (light_distance + 1.0)) - light_cutoff) / (1.0 - light_cutoff); - mediump vec3 light_vec = normalize(view_space_model_origin.xyz - view_space_vertex_position.xyz); - mediump float lamberFactor = dot(light_vec, gbuffer_normal) * 0.2; - - mediump float specularFactor = 0.0; - //if(gbuffer_specular_exponent > 0.0) { - mediump vec3 halfVec = normalize((normalize(- view_space_vertex_position.xyz) + light_vec)); - specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); - //} - - gl_FragColor = vec4(light_color * lamberFactor, specularFactor) * light_attenuation; -} diff --git a/kraken_standard_assets_ios/Shaders/light_point_inside.vsh b/kraken_standard_assets_ios/Shaders/light_point_inside.vsh deleted file mode 100755 index 62c7fd9..0000000 --- a/kraken_standard_assets_ios/Shaders/light_point_inside.vsh +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute vec4 vertex_position; - -void main() -{ - gl_Position = vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/occlusion_test.fsh b/kraken_standard_assets_ios/Shaders/occlusion_test.fsh deleted file mode 100755 index 682a212..0000000 --- a/kraken_standard_assets_ios/Shaders/occlusion_test.fsh +++ /dev/null @@ -1,34 +0,0 @@ -// -// flare.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -void main() { - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); -} diff --git a/kraken_standard_assets_ios/Shaders/occlusion_test.vsh b/kraken_standard_assets_ios/Shaders/occlusion_test.vsh deleted file mode 100755 index f76551f..0000000 --- a/kraken_standard_assets_ios/Shaders/occlusion_test.vsh +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/simple_blit.fsh b/kraken_standard_assets_ios/Shaders/simple_blit.fsh deleted file mode 100755 index abc6fe4..0000000 --- a/kraken_standard_assets_ios/Shaders/simple_blit.fsh +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -varying mediump vec2 textureCoordinate; - -uniform sampler2D diffuseTexture; - -void main() -{ - gl_FragColor = texture2D(diffuseTexture, textureCoordinate); -} diff --git a/kraken_standard_assets_ios/Shaders/simple_blit.vsh b/kraken_standard_assets_ios/Shaders/simple_blit.vsh deleted file mode 100755 index fbc9319..0000000 --- a/kraken_standard_assets_ios/Shaders/simple_blit.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -varying mediump vec2 textureCoordinate; - -attribute vec4 vertex_position; -attribute lowp vec4 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; - textureCoordinate = vertex_uv.xy; -} diff --git a/kraken_standard_assets_ios/Shaders/sky_box.fsh b/kraken_standard_assets_ios/Shaders/sky_box.fsh deleted file mode 100755 index cc4326a..0000000 --- a/kraken_standard_assets_ios/Shaders/sky_box.fsh +++ /dev/null @@ -1,38 +0,0 @@ -// -// sky_box.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -uniform samplerCube diffuseTexture; - -varying mediump vec3 texCoord; - -void main() { - gl_FragColor = textureCube(diffuseTexture, normalize(texCoord)); -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/sky_box.vsh b/kraken_standard_assets_ios/Shaders/sky_box.vsh deleted file mode 100755 index 2a50437..0000000 --- a/kraken_standard_assets_ios/Shaders/sky_box.vsh +++ /dev/null @@ -1,49 +0,0 @@ -// -// sky_box.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// -// - -attribute vec4 vertex_position; -//attribute lowp vec4 vertex_uv; -// -//varying mediump vec2 textureCoordinate; - -varying mediump vec3 texCoord; -uniform highp mat4 inv_mvp_matrix_no_translate; // Inverse of the model-view-projection matrix, without view translation component -uniform mediump vec4 viewport; - -void main() -{ - gl_Position = vec4(vertex_position.xy, 1.0, 1.0); - - vec4 t = inv_mvp_matrix_no_translate * vec4(vertex_position.xy, 1.0, 1.0); - t *= 1.0 / t.w; - texCoord = vec3(t); -} diff --git a/kraken_standard_assets_ios/Shaders/sprite.fsh b/kraken_standard_assets_ios/Shaders/sprite.fsh deleted file mode 100755 index 4519d5d..0000000 --- a/kraken_standard_assets_ios/Shaders/sprite.fsh +++ /dev/null @@ -1,38 +0,0 @@ -// -// sprite.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -varying mediump vec2 texCoord; -uniform sampler2D diffuseTexture; -uniform lowp float material_alpha; - -void main() { - gl_FragColor = vec4(vec3(texture2D(diffuseTexture, texCoord)), 1.0) * material_alpha; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/sprite.vsh b/kraken_standard_assets_ios/Shaders/sprite.vsh deleted file mode 100755 index 1e8682a..0000000 --- a/kraken_standard_assets_ios/Shaders/sprite.vsh +++ /dev/null @@ -1,41 +0,0 @@ -// -// sprite.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute mediump vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices -uniform mediump vec4 viewport; - -varying mediump vec2 texCoord; - -void main() { - texCoord = vertex_uv; - gl_Position = mvp_matrix * vec4(vertex_uv.x * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 1.0); -} diff --git a/kraken_standard_assets_ios/Shaders/visualize_overlay.fsh b/kraken_standard_assets_ios/Shaders/visualize_overlay.fsh deleted file mode 100755 index 42aae77..0000000 --- a/kraken_standard_assets_ios/Shaders/visualize_overlay.fsh +++ /dev/null @@ -1,35 +0,0 @@ -// -// visualize_overlay.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -void main() { - gl_FragColor = vec4(0.0, 0.05, 0.05, 0.0); -} - diff --git a/kraken_standard_assets_ios/Shaders/visualize_overlay.vsh b/kraken_standard_assets_ios/Shaders/visualize_overlay.vsh deleted file mode 100755 index ade5a63..0000000 --- a/kraken_standard_assets_ios/Shaders/visualize_overlay.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// -// visualize_overlay.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_ios/Shaders/volumetric_fog.fsh b/kraken_standard_assets_ios/Shaders/volumetric_fog.fsh deleted file mode 100755 index 247bedb..0000000 --- a/kraken_standard_assets_ios/Shaders/volumetric_fog.fsh +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#extension GL_EXT_shadow_samplers : require - -varying mediump vec4 shadowMapCoord1; -uniform sampler2DShadow shadowTexture1; -uniform mediump vec3 light_color; - -void main() -{ - gl_FragColor = vec4(light_color, 1.0) * shadow2DProjEXT(shadowTexture1, shadowMapCoord1); -} diff --git a/kraken_standard_assets_ios/Shaders/volumetric_fog.vsh b/kraken_standard_assets_ios/Shaders/volumetric_fog.vsh deleted file mode 100755 index 2f98b72..0000000 --- a/kraken_standard_assets_ios/Shaders/volumetric_fog.vsh +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute highp vec4 vertex_position; -uniform highp mat4 inv_mvp_matrix; - -uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space - -uniform highp mat4 shadow_mvp1; -varying mediump vec4 shadowMapCoord1; - -uniform highp mat4 projection_matrix; - - -void main() -{ - highp vec4 d = projection_matrix * vec4(0.0, 0.0, slice_depth_scale.x + vertex_position.z * slice_depth_scale.y, 1.0); - d /= d.w; - gl_Position = vec4(vertex_position.x, vertex_position.y, d.z, 1.0); - - - shadowMapCoord1 = inv_mvp_matrix * gl_Position; - shadowMapCoord1 /= shadowMapCoord1.w; - shadowMapCoord1.w = 1.0; - shadowMapCoord1 = shadow_mvp1 * shadowMapCoord1; - -} diff --git a/kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.fsh b/kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.fsh deleted file mode 100755 index aca802c..0000000 --- a/kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.fsh +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#extension GL_EXT_shadow_samplers : require - -varying mediump vec4 shadowMapCoord1; -uniform sampler2DShadow shadowTexture1; -uniform lowp sampler2D depthFrame; -uniform mediump vec4 viewport; -uniform mediump vec3 light_color; - -void main() -{ - if(gl_FragCoord.z > texture2D(depthFrame, vec2(gl_FragCoord.xy / viewport.zw)).r) discard; - - gl_FragColor = vec4(light_color, 1.0) * shadow2DProjEXT(shadowTexture1, shadowMapCoord1); -} diff --git a/kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.vsh b/kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.vsh deleted file mode 100755 index 9bde6f3..0000000 --- a/kraken_standard_assets_ios/Shaders/volumetric_fog_downsampled.vsh +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -attribute highp vec4 vertex_position; -uniform highp mat4 inv_mvp_matrix; - -uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space - -uniform highp mat4 shadow_mvp1; -varying mediump vec4 shadowMapCoord1; - -uniform highp mat4 projection_matrix; - -void main() -{ - highp vec4 d = projection_matrix * vec4(0.0, 0.0, slice_depth_scale.x + vertex_position.z * slice_depth_scale.y, 1.0); - d /= d.w; - gl_Position = vec4(vertex_position.x, vertex_position.y, d.z, 1.0); - - - shadowMapCoord1 = inv_mvp_matrix * gl_Position; - shadowMapCoord1 /= shadowMapCoord1.w; - shadowMapCoord1.w = 1.0; - shadowMapCoord1 = shadow_mvp1 * shadowMapCoord1; - -} diff --git a/kraken_standard_assets_ios/font.pvr b/kraken_standard_assets_ios/font.pvr deleted file mode 100755 index 7d91f4e36d1420643a22621dc48b7916ac60b87e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43828 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 f)AxU@_X)y%@elvY;oGIS-~RCa - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - - 00000000-0000-0000-0000-000000000000 - MyFactoryFunction - - CFPlugInTypes - - 00000000-0000-0000-0000-000000000000 - - 00000000-0000-0000-0000-000000000000 - - - CFPlugInUnloadFunction - - NSHumanReadableCopyright - Copyright © 2013 Kearwood Software. All rights reserved. - - diff --git a/kraken_standard_assets_osx/Shaders/ObjectShader_osx.fsh b/kraken_standard_assets_osx/Shaders/ObjectShader_osx.fsh deleted file mode 100755 index 52952e3..0000000 --- a/kraken_standard_assets_osx/Shaders/ObjectShader_osx.fsh +++ /dev/null @@ -1,425 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -//#extension GL_EXT_shadow_samplers : require - -out vec4 colorOut; - -#if ENABLE_RIM_COLOR == 1 - uniform lowp vec3 rim_color; - uniform mediump float rim_power; -#endif - -#if FOG_TYPE > 0 - // FOG_TYPE 1 - Linear - // FOG_TYPE 2 - Exponential - // FOG_TYPE 3 - Exponential squared - uniform lowp vec3 fog_color; - uniform mediump float fog_near; - #if FOG_TYPE == 1 - uniform mediump float fog_far; - uniform mediump float fog_scale; - #endif - - #if FOG_TYPE > 1 - uniform mediump float fog_density; - #endif - - #if FOG_TYPE == 2 - uniform mediump float fog_density_premultiplied_exponential; - #endif - #if FOG_TYPE == 3 - uniform mediump float fog_density_premultiplied_squared; - #endif -#endif - - -#if ENABLE_PER_PIXEL == 1 || GBUFFER_PASS == 1 - uniform mediump float material_shininess; - #if HAS_NORMAL_MAP == 1 - uniform sampler2D normalTexture; - #else - in mediump vec3 normal; - #endif - - #if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1 - in highp vec2 texCoord; - #endif - #if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1 - in highp vec2 normal_uv; - #else - #define normal_uv texCoord - #endif -#else - #if HAS_DIFFUSE_MAP == 1 - in highp vec2 texCoord; - #endif -#endif - - -#if GBUFFER_PASS == 3 - uniform sampler2D gbuffer_frame; - uniform sampler2D gbuffer_depth; -#endif - -#if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - in highp mat3 tangent_to_view_matrix; - #else - uniform highp mat4 model_view_inverse_transpose_matrix; - #endif - - #if HAS_DIFFUSE_MAP == 1 && ALPHA_TEST == 1 - uniform sampler2D diffuseTexture; - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - in highp vec2 diffuse_uv; - #else - #define diffuse_uv texCoord - #endif - #endif -#else - uniform lowp vec3 material_ambient, material_diffuse, material_specular; - uniform lowp float material_alpha; - - - #if HAS_DIFFUSE_MAP == 1 - uniform sampler2D diffuseTexture; - #endif - - #if HAS_SPEC_MAP == 1 - uniform sampler2D specularTexture; - #endif - - #if HAS_REFLECTION_MAP == 1 - uniform sampler2D reflectionTexture; - #endif - - #if ENABLE_RIM_COLOR == 1 - #define NEED_EYEVEC - #endif - - #if HAS_REFLECTION_CUBE_MAP == 1 - uniform lowp vec3 material_reflection; - uniform samplerCube reflectionCubeTexture; - #if HAS_NORMAL_MAP == 1 - in highp mat3 tangent_to_world_matrix; - #define NEED_EYEVEC - - uniform highp mat4 model_matrix; - #else - in mediump vec3 reflectionVec; - #endif - #endif - - #ifdef NEED_EYEVEC - in mediump vec3 eyeVec; - #endif - - - #if SHADOW_QUALITY >= 1 - #ifdef GL_EXT_shadow_samplers - uniform sampler2DShadow shadowTexture1; - #else - uniform sampler2D shadowTexture1; - #endif - in highp vec4 shadowMapCoord1; - #endif - - #if HAS_LIGHT_MAP == 1 - uniform sampler2D lightmapTexture; - in mediump vec2 lightmap_uv; - #endif - - #if SHADOW_QUALITY >= 2 - uniform sampler2D shadowTexture2; - in highp vec4 shadowMapCoord2; - #endif - - #if SHADOW_QUALITY >= 3 - uniform sampler2D shadowTexture3; - in highp vec4 shadowMapCoord3; - #endif - - #if ENABLE_PER_PIXEL == 1 - in mediump vec3 lightVec; - in mediump vec3 halfVec; - #else - in mediump float lamberFactor; - in mediump float specularFactor; - #endif - - #if (HAS_SPEC_MAP_OFFSET == 1|| HAS_SPEC_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 - in mediump vec2 spec_uv; - #else - #define spec_uv texCoord - #endif - - #if (HAS_REFLECTION_MAP_OFFSET == 1|| HAS_REFLECTION_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 - in mediump vec2 reflection_uv; - #else - #define reflection_uv texCoord - #endif - - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - in highp vec2 diffuse_uv; - #else - #define diffuse_uv texCoord - #endif - -#endif - -#if GBUFFER_PASS == 1 || GBUFFER_PASS == 3 - uniform mediump vec4 viewport; -#endif - -void main() -{ - #if ALPHA_TEST == 1 && HAS_DIFFUSE_MAP == 1 - mediump vec4 diffuseMaterial = texture(diffuseTexture, diffuse_uv); - if(diffuseMaterial.a < 0.5) discard; - #endif - - #if GBUFFER_PASS == 1 && ALPHA_TEST == 1 - if(texture(diffuseTexture, diffuse_uv).a < 0.5) discard; - #endif - - #if GBUFFER_PASS == 2 || GBUFFER_PASS == 3 - mediump vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - #endif - - #if GBUFFER_PASS == 3 - lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv); - mediump vec3 gbuffer_lamber_factor = gbuffer_sample.rgb * 5.0; - lowp float gbuffer_specular_factor = gbuffer_sample.a; - #endif - - #if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - // lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize - mediump vec3 normal = normalize(2.0 * texture(normalTexture,normal_uv).rgb - 1.0); - mediump vec3 view_space_normal = tangent_to_view_matrix * normal; - #else - mediump vec3 view_space_normal = vec3(model_view_inverse_transpose_matrix * vec4(normal, 1.0)); - #endif - colorOut = vec4(view_space_normal * 0.5 + 0.5, material_shininess / 100.0); - #else - #if HAS_DIFFUSE_MAP == 1 - #if ALPHA_TEST == 1 - diffuseMaterial.a = 1.0; - #else - mediump vec4 diffuseMaterial = texture(diffuseTexture, diffuse_uv); - #endif - - #else - mediump vec4 diffuseMaterial = vec4(1.0); - #endif - - #if ENABLE_PER_PIXEL == 1 - #if HAS_NORMAL_MAP == 1 - // lookup normal from normal map, move from [0,1] to [-1, 1] range, normalize - mediump vec3 normal = normalize(2.0 * texture(normalTexture,normal_uv).rgb - 1.0); - #endif - - #if GBUFFER_PASS == 3 - mediump vec3 lamberFactor = gbuffer_lamber_factor; - #else - mediump float lamberFactor = max(0.0,dot(lightVec, normal)); - #endif - mediump float specularFactor = 0.0; - if(material_shininess > 0.0) { - #if GBUFFER_PASS == 3 - specularFactor = gbuffer_specular_factor; - #else - mediump float halfVecDot = dot(halfVec,normal); - if(halfVecDot > 0.0) { - specularFactor = max(0.0,pow(halfVecDot, material_shininess)); - } - #endif - } - - #ifdef GL_EXT_shadow_samplers - #if SHADOW_QUALITY == 1 - lowp float shadow = shadow2DProjEXT(shadowTexture1, shadowMapCoord1); - lamberFactor *= shadow; - specularFactor *= shadow; - #endif - #else - - #if SHADOW_QUALITY == 1 - - highp float shadowMapDepth = 1.0; - highp float vertexShadowDepth = 1.0; - highp vec2 shadowMapPos = (shadowMapCoord1 / shadowMapCoord1.w).st; - - if(shadowMapCoord1.x >= -1.0 && shadowMapCoord1.x <= 1.0 && shadowMapCoord1.y >= -1.0 && shadowMapCoord1.y <= 1.0 && shadowMapCoord1.z >= 0.0 && shadowMapCoord1.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5, 0.0); - #endif - shadowMapDepth = texture(shadowTexture1, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z; - } - #endif - - #if SHADOW_QUALITY >= 2 - - highp float shadowMapDepth = 1.0; - highp float vertexShadowDepth = 1.0; - - if(shadowMapCoord1.x >= -1.0 && shadowMapCoord1.x <= 1.0 && shadowMapCoord1.y >= -1.0 && shadowMapCoord1.y <= 1.0 && shadowMapCoord1.z >= 0.0 && shadowMapCoord1.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.75, 0.75, 0.5, 1.0) + vec4(0.0, 0.0, 0.5 * diffuseMaterial.a, 0.0); - #endif - highp vec2 shadowMapPos = (shadowMapCoord1 / shadowMapCoord1.w).st; - shadowMapDepth = texture(shadowTexture1, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord1 / shadowMapCoord1.w).z; - } else if(shadowMapCoord2.s >= -1.0 && shadowMapCoord2.s <= 1.0 && shadowMapCoord2.t >= -1.0 && shadowMapCoord2.t <= 1.0 && shadowMapCoord2.z >= 0.0 && shadowMapCoord2.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.75, 0.50, 0.75, 1.0) + vec4(0.0, 0.5 * diffuseMaterial.a, 0.0, 0.0); - #endif - highp vec2 shadowMapPos = (shadowMapCoord2 / shadowMapCoord2.w).st; - shadowMapDepth = texture(shadowTexture2, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord2 / shadowMapCoord2.w).z; - } - #if SHADOW_QUALITY >= 3 - else if(shadowMapCoord3.s >= -1.0 && shadowMapCoord3.s <= 1.0 && shadowMapCoord3.t >= -1.0 && shadowMapCoord3.t <= 1.0 && shadowMapCoord3.z >= 0.0 && shadowMapCoord3.z <= 1.0) { - #if DEBUG_PSSM == 1 - diffuseMaterial = diffuseMaterial * vec4(0.50, 0.75, 0.75, 1.0) + vec4(0.5 * diffuseMaterial.a, 0.0, 0.0, 0.0); - #endif - highp vec2 shadowMapPos = (shadowMapCoord3 / shadowMapCoord3.w).st; - shadowMapDepth = texture(shadowTexture3, shadowMapPos).z; - vertexShadowDepth = (shadowMapCoord3 / shadowMapCoord3.w).z; - } - - #endif - #endif - - #if SHADOW_QUALITY >= 1 - if(vertexShadowDepth >= shadowMapDepth && shadowMapDepth < 1.0) { - #if GBUFFER_PASS == 3 - lamberFactor = vec3(0.0); - #else - lamberFactor = 0.0; - #endif - specularFactor = 0.0; - } - #endif - #endif - #endif - - #if ENABLE_AMBIENT == 1 - // -------------------- Add ambient light and alpha component -------------------- - colorOut = vec4(vec3(diffuseMaterial) * material_ambient, 0.0); - #else - colorOut = vec4(0.0, 0.0, 0.0, 0.0); - #endif - - #if ENABLE_DIFFUSE == 1 - // -------------------- Add diffuse light -------------------- - colorOut += diffuseMaterial * vec4(material_diffuse * lamberFactor, 1.0); - #endif - - // -------------------- Apply material_alpha -------------------- - - #if ALPHA_BLEND == 1 - colorOut.a = diffuseMaterial.a; - colorOut *= material_alpha; - #endif - - // -------------------- Add specular light -------------------- - // Additive, not masked against diffuse alpha - #if ENABLE_SPECULAR == 1 - #if HAS_SPEC_MAP == 1 && ENABLE_PER_PIXEL == 1 - colorOut.rgb += material_specular * vec3(texture(specularTexture, spec_uv)) * specularFactor; - #else - colorOut.rgb += material_specular * specularFactor; - #endif - #endif - - // -------------------- Multiply light map -------------------- - #if HAS_LIGHT_MAP == 1 - mediump vec3 lightMapColor = vec3(texture(lightmapTexture, lightmap_uv)); - //colorOut = vec4(colorOut.r * lightMapColor.r, colorOut.g * lightMapColor.g, colorOut.b * lightMapColor.b, colorOut.a); - colorOut.rgb *= lightMapColor; - #endif - - - // -------------------- Add reflected light -------------------- - #if HAS_REFLECTION_CUBE_MAP == 1 - // Reflected light is additive and not modulated by the light map - #if HAS_NORMAL_MAP == 1 - // Calculate reflection vector as I - 2.0 * dot(N, I) * N - mediump vec3 incidenceVec = -normalize(eyeVec); - highp vec3 world_space_normal = tangent_to_world_matrix * normal; - mediump vec3 reflectionVec = mat3(model_matrix) * (incidenceVec - 2.0 * dot(world_space_normal, incidenceVec) * world_space_normal); - #endif - #if HAS_REFLECTION_MAP == 1 - colorOut += vec4(material_reflection, 0.0) * texture(reflectionTexture, reflection_uv) * vec4(texture(reflectionCubeTexture, reflectionVec).rgb, 1.0); - #else - colorOut += vec4(material_reflection, 0.0) * vec4(texture(reflectionCubeTexture, reflectionVec).rgb, 1.0); - #endif - #endif - - // -------------------- Apply Fog -------------------- - #if FOG_TYPE == 1 || FOG_TYPE == 2 || FOG_TYPE == 3 - - #if FOG_TYPE == 1 - // Linear fog - lowp float fog_alpha = clamp((fog_far - gl_FragCoord.z / gl_FragCoord.w) * fog_scale, 0.0, 1.0); - #endif - - #if FOG_TYPE == 2 - // Exponential fog - mediump float fog_z = gl_FragCoord.z / gl_FragCoord.w - fog_near; - lowp float fog_alpha = clamp(exp2(fog_density_premultiplied_exponential * fog_z), 0.0, 1.0); - #endif - - #if FOG_TYPE == 3 - // Exponential squared fog - mediump float fog_z = max(gl_FragCoord.z / gl_FragCoord.w - fog_near, 0.0); - lowp float fog_alpha = clamp(exp2(fog_density_premultiplied_squared * fog_z * fog_z), 0.0, 1.0); - #endif - - #if ALPHA_BLEND == 1 - colorOut.rgb = mix(fog_color.rgb * colorOut.a, colorOut.rgb, fog_alpha); - #else - colorOut.rgb = mix(fog_color.rgb, colorOut.rgb, fog_alpha); - #endif - #endif - - - #endif - - #if ENABLE_RIM_COLOR == 1 - lowp float rim = 1.0 - clamp(dot(normalize(eyeVec), normal), 0.0, 1.0); - - colorOut += vec4(rim_color, 1.0) * pow(rim, rim_power); - #endif - - #if BONE_COUNT > 0 - colorOut.b = 1.0; - #endif -} diff --git a/kraken_standard_assets_osx/Shaders/ObjectShader_osx.vsh b/kraken_standard_assets_osx/Shaders/ObjectShader_osx.vsh deleted file mode 100755 index aadb768..0000000 --- a/kraken_standard_assets_osx/Shaders/ObjectShader_osx.vsh +++ /dev/null @@ -1,344 +0,0 @@ -// -// Shader.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - - -in highp vec3 vertex_position, vertex_normal; -#if HAS_NORMAL_MAP == 1 - in highp vec3 vertex_tangent; -#endif -in mediump vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -#if BONE_COUNT > 0 - in highp vec4 bone_weights; - in highp vec4 bone_indexes; - uniform highp mat4 bone_transforms[BONE_COUNT]; -#else - #define vertex_position_skinned vertex_position - #define vertex_normal_skinned vertex_normal - #define vertex_tangent_skinned vertex_tangent -#endif - - - -#if ENABLE_PER_PIXEL == 1 || GBUFFER_PASS == 1 - #if HAS_DIFFUSE_MAP == 1 || HAS_NORMAL_MAP == 1 || HAS_SPEC_MAP == 1 || HAS_REFLECTION_MAP == 1 - out highp vec2 texCoord; - #endif - #if HAS_NORMAL_MAP == 1 - #if HAS_NORMAL_MAP_SCALE == 1 - uniform highp vec2 normalTexture_Scale; - #endif - - #if HAS_NORMAL_MAP_OFFSET == 1 - uniform highp vec2 normalTexture_Offset; - #endif - - #if HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1 - out highp vec2 normal_uv; - #endif - #else - out mediump vec3 normal; - #endif -#else - uniform mediump float material_shininess; - #if HAS_DIFFUSE_MAP == 1 - out highp vec2 texCoord; - #endif -#endif - -#if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - uniform highp mat4 model_view_inverse_transpose_matrix; - out highp mat3 tangent_to_view_matrix; - #endif -#else - - uniform highp vec3 light_direction_model_space; // Must be normalized before entering shader - uniform highp vec3 camera_position_model_space; - - #if HAS_LIGHT_MAP == 1 - in mediump vec2 vertex_lightmap_uv; - out mediump vec2 lightmap_uv; - #endif - - #if ENABLE_PER_PIXEL == 1 - out mediump vec3 lightVec; - out mediump vec3 halfVec; - - #if HAS_SPEC_MAP_OFFSET == 1 || HAS_SPEC_MAP_SCALE == 1 - out highp vec2 spec_uv; - #endif - - #if HAS_SPEC_MAP_SCALE == 1 - uniform highp vec2 specularTexture_Scale; - #endif - - #if HAS_SPEC_MAP_OFFSET == 1 - uniform highp vec2 specularTexture_Offset; - #endif - - #if HAS_REFLECTION_MAP_OFFSET == 1 || HAS_REFLECTION_MAP_SCALE == 1 - out highp vec2 reflection_uv; - #endif - - #if HAS_REFLECTION_MAP_SCALE == 1 - uniform highp vec2 reflectionTexture_Scale; - #endif - - #if HAS_REFLECTION_MAP_OFFSET == 1 - uniform highp vec2 reflectionTexture_Offset; - #endif - - #if SHADOW_QUALITY >= 1 - uniform highp mat4 shadow_mvp1; - out highp vec4 shadowMapCoord1; - #endif - - #if SHADOW_QUALITY >= 2 - uniform highp mat4 shadow_mvp2; - out highp vec4 shadowMapCoord2; - #endif - - #if SHADOW_QUALITY >= 3 - uniform highp mat4 shadow_mvp3; - out highp vec4 shadowMapCoord3; - #endif - - #else - out mediump float lamberFactor; - out mediump float specularFactor; - #endif - - #if ENABLE_RIM_COLOR == 1 - #define NEED_EYEVEC - #endif - - #if HAS_REFLECTION_CUBE_MAP == 1 - #if HAS_NORMAL_MAP == 1 - #define NEED_EYEVEC - uniform highp mat4 model_inverse_transpose_matrix; - out highp mat3 tangent_to_world_matrix; - #else - uniform highp mat4 model_matrix; - out mediump vec3 reflectionVec; - #endif - #endif - - #ifdef NEED_EYEVEC - out mediump vec3 eyeVec; - #endif - - #if HAS_DIFFUSE_MAP_SCALE == 1 - uniform highp vec2 diffuseTexture_Scale; - #endif - - #if HAS_DIFFUSE_MAP_OFFSET == 1 - uniform highp vec2 diffuseTexture_Offset; - #endif - - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - out highp vec2 diffuse_uv; - #endif - -#endif - - - -void main() -{ -#if BONE_COUNT > 0 - mediump vec4 scaled_bone_indexes = bone_indexes; - mediump vec4 scaled_bone_weights = bone_weights; - - //scaled_bone_indexes = vec4(0.0, 0.0, 0.0, 0.0); - //scaled_bone_weights = vec4(1.0, 0.0, 0.0, 0.0); - - highp mat4 skin_matrix = - bone_transforms[ int(scaled_bone_indexes.x) ] * scaled_bone_weights.x + - bone_transforms[ int(scaled_bone_indexes.y) ] * scaled_bone_weights.y + - bone_transforms[ int(scaled_bone_indexes.z) ] * scaled_bone_weights.z + - bone_transforms[ int(scaled_bone_indexes.w) ] * scaled_bone_weights.w; - //skin_matrix = bone_transforms[0]; - highp vec3 vertex_position_skinned = (skin_matrix * vec4(vertex_position, 1)).xyz; - - highp vec3 vertex_normal_skinned = normalize(mat3(skin_matrix) * vertex_normal); - #if HAS_NORMAL_MAP == 1 - highp vec3 vertex_tangent_skinned = normalize(mat3(skin_matrix) * vertex_tangent); - #endif - -#endif - - // Transform position - gl_Position = mvp_matrix * vec4(vertex_position_skinned,1.0); - - - - #if HAS_DIFFUSE_MAP == 1 || (HAS_NORMAL_MAP == 1 && ENABLE_PER_PIXEL == 1) || (HAS_SPEC_MAP == 1 && ENABLE_PER_PIXEL == 1) || (HAS_REFLECTION_MAP == 1 && ENABLE_PER_PIXEL == 1) - // Pass UV co-ordinates - texCoord = vertex_uv.st; - #endif - - - - - // Scaled and translated normal map UV's - #if (HAS_NORMAL_MAP_OFFSET == 1 || HAS_NORMAL_MAP_SCALE == 1) && ENABLE_PER_PIXEL == 1 - normal_uv = texCoord; - - #if HAS_NORMAL_MAP_OFFSET == 1 - normal_uv += normalTexture_Offset; - #endif - - #if HAS_NORMAL_MAP_SCALE == 1 - normal_uv *= normalTexture_Scale; - #endif - - #endif - - #if GBUFFER_PASS != 1 || ALPHA_TEST == 1 - // Scaled and translated diffuse map UV's - #if HAS_DIFFUSE_MAP_OFFSET == 1 || HAS_DIFFUSE_MAP_SCALE == 1 - diffuse_uv = texCoord; - - #if HAS_DIFFUSE_MAP_OFFSET == 1 - diffuse_uv += diffuseTexture_Offset; - #endif - - #if HAS_DIFFUSE_MAP_SCALE == 1 - diffuse_uv *= diffuseTexture_Scale; - #endif - #endif - #endif - - - #if GBUFFER_PASS == 1 - #if HAS_NORMAL_MAP == 1 - mediump vec3 a_bitangent = cross(vertex_normal_skinned, vertex_tangent_skinned); - tangent_to_view_matrix[0] = vec3(model_view_inverse_transpose_matrix * vec4(vertex_tangent_skinned, 1.0)); - tangent_to_view_matrix[1] = vec3(model_view_inverse_transpose_matrix * vec4(a_bitangent, 1.0)); - tangent_to_view_matrix[2] = vec3(model_view_inverse_transpose_matrix * vec4(vertex_normal_skinned, 1.0)); - #else - normal = vertex_normal_skinned; - #endif - #else - - #if HAS_REFLECTION_CUBE_MAP == 1 - #if HAS_NORMAL_MAP == 1 - - #else - // Calculate reflection vector as I - 2.0 * dot(N, I) * N - mediump vec3 eyeVec = normalize(camera_position_model_space - vertex_position_skinned); - mediump vec3 incidenceVec = -eyeVec; - reflectionVec = mat3(model_matrix) * (incidenceVec - 2.0 * dot(vertex_normal_skinned, incidenceVec) * vertex_normal_skinned); - #endif - #endif - - #ifdef NEED_EYEVEC - eyeVec = normalize(camera_position_model_space - vertex_position_skinned); - #endif - - #if HAS_LIGHT_MAP == 1 - // Pass shadow UV co-ordinates - lightmap_uv = vertex_lightmap_uv.st; - #endif - - - - #if ENABLE_PER_PIXEL == 1 - // Scaled and translated specular map UV's - #if HAS_SPEC_MAP_OFFSET == 1 || HAS_SPEC_MAP_SCALE == 1 - spec_uv = texCoord; - #if HAS_SPEC_MAP_OFFSET == 1 - spec_uv += specularTexture_Offset; - #endif - - #if HAS_SPEC_MAP_SCALE == 1 - spec_uv *= specularTexture_Scale; - #endif - #endif - - // Scaled and translated reflection map UV's - #if HAS_REFLECTION_MAP_OFFSET == 1 || HAS_REFLECTION_MAP_SCALE == 1 - reflection_uv = texCoord; - #if HAS_REFLECTION_MAP_OFFSET == 1 - reflection_uv += reflectionTexture_Offset; - #endif - - #if HAS_REFLECTION_MAP_SCALE == 1 - reflection_uv *= reflectionTexture_Scale; - #endif - #endif - - - #if SHADOW_QUALITY >= 1 - shadowMapCoord1 = shadow_mvp1 * vec4(vertex_position_skinned,1.0); - #endif - - #if SHADOW_QUALITY >= 2 - shadowMapCoord2 = shadow_mvp2 * vec4(vertex_position_skinned,1.0); - #endif - - #if SHADOW_QUALITY >= 3 - shadowMapCoord3 = shadow_mvp3 * vec4(vertex_position_skinned,1.0); - #endif - - // ----------- Directional Light (Sun) ----------- - #if HAS_NORMAL_MAP == 1 - // ----- Calculate per-pixel lighting in tangent space, for normal mapping ------ - mediump vec3 a_bitangent = cross(vertex_normal_skinned, vertex_tangent_skinned); - #if HAS_REFLECTION_CUBE_MAP == 0 - // The cube map reflections also require an eyeVec as a varying attribute when normal mapping, so only re-calculate here when needed - mediump vec3 eyeVec = normalize(camera_position_model_space - vertex_position_skinned); - #else - tangent_to_world_matrix[0] = vec3(model_inverse_transpose_matrix * vec4(vertex_tangent_skinned, 1.0)); - tangent_to_world_matrix[1] = vec3(model_inverse_transpose_matrix * vec4(a_bitangent, 1.0)); - tangent_to_world_matrix[2] = vec3(model_inverse_transpose_matrix * vec4(vertex_normal_skinned, 1.0)); - #endif - - lightVec = normalize(vec3(dot(light_direction_model_space, vertex_tangent_skinned), dot(light_direction_model_space, a_bitangent), dot(light_direction_model_space, vertex_normal_skinned))); - halfVec = normalize(vec3(dot(eyeVec, vertex_tangent_skinned), dot(eyeVec, a_bitangent), dot(eyeVec, vertex_normal_skinned))); - halfVec = normalize(halfVec + lightVec); // Normalizing anyways, no need to divide by 2 - #else - // ------ Calculate per-pixel lighting without normal mapping ------ - normal = vertex_normal_skinned; - lightVec = light_direction_model_space; - halfVec = normalize((normalize(camera_position_model_space - vertex_position_skinned) + lightVec)); // Normalizing anyways, no need to divide by 2 - #endif - #else - - // ------ Calculate per-vertex lighting ------ - mediump vec3 halfVec = normalize((normalize(camera_position_model_space - vertex_position_skinned) + light_direction_model_space)); // Normalizing anyways, no need to divide by 2 - lamberFactor = max(0.0,dot(light_direction_model_space, vertex_normal_skinned)); - specularFactor = max(0.0,pow(dot(halfVec,vertex_normal_skinned), material_shininess)); - #endif - #endif -} diff --git a/kraken_standard_assets_osx/Shaders/PostShader_osx.fsh b/kraken_standard_assets_osx/Shaders/PostShader_osx.fsh deleted file mode 100755 index eba229c..0000000 --- a/kraken_standard_assets_osx/Shaders/PostShader_osx.fsh +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#define ENABLE_VIDEO_BG 0 -#define PIXEL_SHIFT_1 0.001 -#define PIXEL_SHIFT_2 0.002 -#define PIXEL_SHIFT_3 0.003 -#define PIXEL_SHIFT_4 0.004 - -in vec2 textureCoordinate; - -#if ENABLE_VIDEO_BG == 1 -uniform sampler2D videoFrame; -#endif - -#if ENABLE_FADE_COLOR == 1 -uniform vec4 fade_color; -#endif - -uniform sampler2D renderFrame; -uniform sampler2D depthFrame; - -#if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1 -uniform sampler2D volumetricEnvironmentFrame; -#endif - -out vec4 colorOut; - -void main() -{ - - vec4 renderColor = texture(renderFrame, textureCoordinate); -#if DOF_QUALITY > 0 || ENABLE_FLASH == 1 - float depth = texture(depthFrame, textureCoordinate).r; -#endif - vec4 pixelColor = renderColor; - - -#if DOF_QUALITY == 2 - - // Render high quality circle of confusion - // __XXX__ - // _XXXXX_ - // _XXXXX_ - // _XXXXX_ - // __XXX__ - float cf1 = PIXEL_SHIFT_1; - float cf2 = PIXEL_SHIFT_2; - - float bx1 = textureCoordinate.s + cf1; - float bx2 = textureCoordinate.s + cf2; - float bxm1 = textureCoordinate.s - cf1; - float bxm2 = textureCoordinate.s - cf2; - - float by1 = textureCoordinate.t + cf1; - float by2 = textureCoordinate.t + cf2; - float bym1 = textureCoordinate.t - cf1; - float bym2 = textureCoordinate.t - cf2; - - pixelColor += texture(renderFrame, vec2(bx1, textureCoordinate.t)); - pixelColor += texture(renderFrame, vec2(bxm1, textureCoordinate.t)); - pixelColor += texture(renderFrame, vec2(bx2, textureCoordinate.t)); - pixelColor += texture(renderFrame, vec2(bxm2, textureCoordinate.t)); - - pixelColor += texture(renderFrame, vec2(textureCoordinate.s, by1)); - pixelColor += texture(renderFrame, vec2(bx1, by1)); - pixelColor += texture(renderFrame, vec2(bxm1, by1)); - pixelColor += texture(renderFrame, vec2(bx2, by1)); - pixelColor += texture(renderFrame, vec2(bxm2, by1)); - - pixelColor += texture(renderFrame, vec2(textureCoordinate.s, by2)); - pixelColor += texture(renderFrame, vec2(bx1, by2)); - pixelColor += texture(renderFrame, vec2(bxm1, by2)); - - pixelColor += texture(renderFrame, vec2(textureCoordinate.s,bym1)); - pixelColor += texture(renderFrame, vec2(bx1,bym1)); - pixelColor += texture(renderFrame, vec2(bxm1,bym1)); - pixelColor += texture(renderFrame, vec2(bx2,bym1)); - pixelColor += texture(renderFrame, vec2(bxm2,bym1)); - - pixelColor += texture(renderFrame, vec2(bx1, bym2)); - pixelColor += texture(renderFrame, vec2(bx1, bym2)); - pixelColor += texture(renderFrame, vec2(bxm1, bym2)); - pixelColor /= 21.0; - -#endif -// DOF_QUALITY == 2 - -#if DOF_QUALITY == 1 - - // Render low quality circle of confusion - // ___X___ - // __XXX__ - // _XXXXX_ - // __XXX__ - // ___X___ - pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_2, 0)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, 0)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, 0)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_2, 0)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(-PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_1)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(+PIXEL_SHIFT_1, -PIXEL_SHIFT_1)); - pixelColor += texture(renderFrame, textureCoordinate + vec2(0, -PIXEL_SHIFT_2)); - pixelColor /= 13.0; - -#endif -// DOF_QUALITY == 1 - -#if DOF_QUALITY > 0 - float focusDepth = texture(depthFrame, vec2(0.5, 0.5)).r; - float blurAmount = clamp((depth - DOF_DEPTH - focusDepth) / DOF_FALLOFF, 0.0, 1.0); - pixelColor = pixelColor * blurAmount + renderColor * (1.0 - blurAmount); -#endif - - // ---- DEPTH_OF_FIELD END ---- - - - - - // ---- NIGHT_TIME START ---- -#if ENABLE_FLASH == 1 - // Un-comment to enable night time / flash effect - pixelColor *= vec4(vec3(1.0 - clamp((depth - FLASH_DEPTH) / FLASH_FALLOFF, 0.0, 1.0)) * FLASH_INTENSITY, 1.0); - //pixelColor *= vec4(vec3(clamp(1.0 / (depth - FLASH_DEPTH) * FLASH_FALLOFF, 0.0, 1.0) * FLASH_INTENSITY), 1.0); - -#endif - // ---- NIGHT_TIME END ---- - - // ---- VIDEO_BG START ---- - - - // ---- VIDEO_BG END ---- - -#if VOLUMETRIC_ENVIRONMENT_DOWNSAMPLED == 1 - pixelColor += texture(volumetricEnvironmentFrame, textureCoordinate); -#endif - - - // ---- VIGNETTE START ---- - - // Render vignette effect - -#if ENABLE_VIGNETTE == 1 - pixelColor *= vec4(vec3(clamp(1.0 - (distance(textureCoordinate, vec2(0.5, 0.5)) - VIGNETTE_RADIUS) / VIGNETTE_FALLOFF, 0.0, 1.0)), 1.0); -#endif - // ---- VIGNETTE END ---- - -#if ENABLE_FADE_COLOR == 1 - pixelColor.rgb = mix(pixelColor.rgb, fade_color.rgb, fade_color.a); -#endif - - colorOut = pixelColor; - - //PASSTHROUGH STATEMENT - // colorOut = texture(depthFrame, textureCoordinate); - - //colorOut = vec4(vec3(blurAmount), 1.0); - - colorOut = vec4(0.0, 0.0, 1.0, 1.0); // FINDME, KIP!!, HACK!! -} - diff --git a/kraken_standard_assets_osx/Shaders/PostShader_osx.vsh b/kraken_standard_assets_osx/Shaders/PostShader_osx.vsh deleted file mode 100755 index 600f844..0000000 --- a/kraken_standard_assets_osx/Shaders/PostShader_osx.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -uniform vec2 viewport_downsample; -in vec4 vertex_position; -in vec4 vertex_uv; - -out vec2 textureCoordinate; - -void main() -{ - gl_Position = vertex_position; - textureCoordinate = vertex_uv.xy * viewport_downsample.xy; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/ShadowShader_osx.fsh b/kraken_standard_assets_osx/Shaders/ShadowShader_osx.fsh deleted file mode 100755 index 8c19e35..0000000 --- a/kraken_standard_assets_osx/Shaders/ShadowShader_osx.fsh +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -//in mediump vec2 texCoord; - -out vec4 colorOut; - -void main() -{ - colorOut = vec4(1.0, 1.0, 1.0, 1.0); -} diff --git a/kraken_standard_assets_osx/Shaders/ShadowShader_osx.vsh b/kraken_standard_assets_osx/Shaders/ShadowShader_osx.vsh deleted file mode 100755 index 382558f..0000000 --- a/kraken_standard_assets_osx/Shaders/ShadowShader_osx.vsh +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -#define SHADOW_BIAS 0.01 - - -in highp vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - // Transform position - /* - position = shadow_mvp1 * vec4(vertex_position,1.0); - */ - gl_Position = mvp_matrix * vertex_position; - gl_Position.z += SHADOW_BIAS; - /* - // Pass UV co-ordinates - texCoord = vertex_uv.st; - */ - -} diff --git a/kraken_standard_assets_osx/Shaders/debug_font_osx.fsh b/kraken_standard_assets_osx/Shaders/debug_font_osx.fsh deleted file mode 100755 index bfda860..0000000 --- a/kraken_standard_assets_osx/Shaders/debug_font_osx.fsh +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -in mediump vec2 textureCoordinate; - -uniform sampler2D diffuseTexture; - -void main() -{ - vec4 font_color = texture(diffuseTexture, textureCoordinate); - colorOut = vec4(font_color.r, font_color.g, font_color.b, font_color.r + 0.50); -} diff --git a/kraken_standard_assets_osx/Shaders/debug_font_osx.vsh b/kraken_standard_assets_osx/Shaders/debug_font_osx.vsh deleted file mode 100755 index c6680d4..0000000 --- a/kraken_standard_assets_osx/Shaders/debug_font_osx.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out mediump vec2 textureCoordinate; - -in vec4 vertex_position; -in lowp vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = /*mvp_matrix * */vertex_position; - textureCoordinate = vertex_uv; -} diff --git a/kraken_standard_assets_osx/Shaders/dust_particle_osx.fsh b/kraken_standard_assets_osx/Shaders/dust_particle_osx.fsh deleted file mode 100755 index 92a36eb..0000000 --- a/kraken_standard_assets_osx/Shaders/dust_particle_osx.fsh +++ /dev/null @@ -1,45 +0,0 @@ -// -// dust_particle.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -//#extension GL_EXT_shadow_samplers : require - -out vec4 colorOut; - -in mediump vec2 texCoord; - -in mediump vec4 shadowMapCoord1; -uniform sampler2DShadow shadowTexture1; -uniform mediump vec3 light_color; -in lowp float intensity_modulate; - -void main() { - colorOut = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1) * max(1.0 - texCoord.x*texCoord.x-texCoord.y*texCoord.y, 0.0) * intensity_modulate; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/dust_particle_osx.vsh b/kraken_standard_assets_osx/Shaders/dust_particle_osx.vsh deleted file mode 100755 index 66aee7d..0000000 --- a/kraken_standard_assets_osx/Shaders/dust_particle_osx.vsh +++ /dev/null @@ -1,57 +0,0 @@ -// -// dust_particle.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in mediump vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices -uniform mediump vec4 viewport; -uniform mediump float flare_size; -in vec4 vertex_position; -uniform highp vec3 particle_origin; - -uniform highp mat4 shadow_mvp1; -out mediump vec4 shadowMapCoord1; - -out mediump vec2 texCoord; -uniform highp float time_absolute; -out lowp float intensity_modulate; - -void main() { - highp vec4 offset_center = vertex_position + vec4(particle_origin, 0.0); - offset_center.xyz += vec3(sin((time_absolute + vertex_position.x * 100.0) * 0.05), sin((time_absolute + vertex_position.y * 100.0) * 0.07), sin((time_absolute + vertex_position.z * 100.0) * 0.03)) * 0.05; - offset_center = vec4(mod(offset_center.x + 1.0, 2.0) - 1.0, mod(offset_center.y + 1.0, 2.0) - 1.0, mod(offset_center.z + 1.0, 2.0) - 1.0, 1.0); - highp vec4 particle_center = mvp_matrix * offset_center; - texCoord = vertex_uv * 3.46410161513775; // 3.46410161513775 = 2 * sqrt(3); 1 / (2 * sqrt(3)) is the radius of a circle encompased by a equilateral triangle with a side length of 1. - gl_Position = particle_center + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size; - - shadowMapCoord1 = shadow_mvp1 * offset_center; - - intensity_modulate = sin(time_absolute + mod(vertex_position.x * 100.0, 6.28318530717959)) * 0.5 + 0.5; -} diff --git a/kraken_standard_assets_osx/Shaders/flare_osx.fsh b/kraken_standard_assets_osx/Shaders/flare_osx.fsh deleted file mode 100755 index 0d2831c..0000000 --- a/kraken_standard_assets_osx/Shaders/flare_osx.fsh +++ /dev/null @@ -1,40 +0,0 @@ -// -// flare.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -in vec2 texCoord; -uniform sampler2D diffuseTexture; -uniform float material_alpha; - -void main() { - colorOut = vec4(vec3(texture(diffuseTexture, texCoord)), 1.0) * material_alpha; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/flare_osx.vsh b/kraken_standard_assets_osx/Shaders/flare_osx.vsh deleted file mode 100755 index d168d5c..0000000 --- a/kraken_standard_assets_osx/Shaders/flare_osx.vsh +++ /dev/null @@ -1,42 +0,0 @@ -// -// flare.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in vec2 vertex_uv; -uniform mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices -uniform vec4 viewport; -uniform float flare_size; - -out vec2 texCoord; - -void main() { - texCoord = vertex_uv; - gl_Position = mvp_matrix * vec4(0.0, 0.0, 0.0, 1.0) + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size; -} diff --git a/kraken_standard_assets_osx/Shaders/light_directional_osx.fsh b/kraken_standard_assets_osx/Shaders/light_directional_osx.fsh deleted file mode 100755 index 77c8a6f..0000000 --- a/kraken_standard_assets_osx/Shaders/light_directional_osx.fsh +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -uniform sampler2D gbuffer_frame; -uniform sampler2D gbuffer_depth; - -uniform mediump vec3 light_direction_view_space; // Must be normalized and converted to view space before entering shader -uniform lowp vec3 light_color; -uniform highp float light_intensity; -uniform mediump vec4 viewport; - -void main() -{ - lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv); - - mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); - mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; - - mediump vec3 view_space_vertex_position = vec3( - ((2.0 * gl_FragCoord.xy) - (2.0 * viewport.xy)) / (viewport.zw) - 1.0, - (2.0 * -texture(gbuffer_depth, gbuffer_uv).r - gl_DepthRange.near - gl_DepthRange.far) / (gl_DepthRange.far - gl_DepthRange.near) - ); - - //mediump float lamberFactor = max(0.0,dot(light_direction_view_space, gbuffer_normal)) * 0.2; - mediump float lamberFactor = dot(light_direction_view_space, gbuffer_normal) * 0.2; - - mediump float specularFactor = 0.0; - - mediump vec3 halfVec = normalize((normalize(- view_space_vertex_position) + light_direction_view_space)); // Normalizing anyways, no need to divide by 2 - specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); - - - colorOut = vec4(light_color * lamberFactor, specularFactor) * light_intensity; -} diff --git a/kraken_standard_assets_osx/Shaders/light_directional_osx.vsh b/kraken_standard_assets_osx/Shaders/light_directional_osx.vsh deleted file mode 100755 index d99548a..0000000 --- a/kraken_standard_assets_osx/Shaders/light_directional_osx.vsh +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in vec4 vertex_position; - -void main() -{ - gl_Position = vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/light_point_inside_osx.fsh b/kraken_standard_assets_osx/Shaders/light_point_inside_osx.fsh deleted file mode 100755 index 07f032d..0000000 --- a/kraken_standard_assets_osx/Shaders/light_point_inside_osx.fsh +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -uniform sampler2D gbuffer_frame; -uniform sampler2D gbuffer_depth; - -uniform lowp vec3 light_color; -uniform highp float light_intensity; -uniform highp float light_decay_start; -uniform highp float light_cutoff; -uniform mediump vec4 viewport; - -uniform highp mat4 inv_projection_matrix; - -uniform highp vec3 view_space_model_origin; - -void main() -{ - - lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv); - - mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); - mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; - - mediump vec4 clip_space_vertex_position = vec4( - gl_FragCoord.xy / viewport.zw * 2.0 - 1.0, - texture(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0, - 1.0 - ); - - - mediump vec4 view_space_vertex_position = inv_projection_matrix * clip_space_vertex_position; - view_space_vertex_position.xyz /= view_space_vertex_position.w; - - mediump float light_distance = max(0.0, distance(view_space_model_origin.xyz, view_space_vertex_position.xyz) - light_decay_start); - mediump float light_attenuation = (light_intensity / ((light_distance + 1.0) * (light_distance + 1.0)) - light_cutoff) / (1.0 - light_cutoff); - mediump vec3 light_vec = normalize(view_space_model_origin.xyz - view_space_vertex_position.xyz); - mediump float lamberFactor = dot(light_vec, gbuffer_normal) * 0.2; - - mediump float specularFactor = 0.0; - //if(gbuffer_specular_exponent > 0.0) { - mediump vec3 halfVec = normalize((normalize(- view_space_vertex_position.xyz) + light_vec)); - specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); - //} - - colorOut = vec4(light_color * lamberFactor, specularFactor) * light_attenuation; -} diff --git a/kraken_standard_assets_osx/Shaders/light_point_inside_osx.vsh b/kraken_standard_assets_osx/Shaders/light_point_inside_osx.vsh deleted file mode 100755 index d99548a..0000000 --- a/kraken_standard_assets_osx/Shaders/light_point_inside_osx.vsh +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in vec4 vertex_position; - -void main() -{ - gl_Position = vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/light_point_osx.fsh b/kraken_standard_assets_osx/Shaders/light_point_osx.fsh deleted file mode 100755 index 2921cf1..0000000 --- a/kraken_standard_assets_osx/Shaders/light_point_osx.fsh +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -uniform sampler2D gbuffer_frame; -uniform sampler2D gbuffer_depth; - -uniform lowp vec3 light_color; -uniform highp float light_intensity; -uniform highp float light_decay_start; -uniform highp float light_cutoff; -uniform mediump vec4 viewport; - -uniform highp mat4 inv_projection_matrix; - -uniform highp vec3 view_space_model_origin; // For point lights, this is the position of the light - -void main() -{ - - lowp vec2 gbuffer_uv = vec2(gl_FragCoord.xy / viewport.zw); // FINDME, TODO - Dependent Texture Read adding latency, due to calculation of texture UV within fragment -- move to vertex shader? - lowp vec4 gbuffer_sample = texture(gbuffer_frame, gbuffer_uv); - - mediump vec3 gbuffer_normal = normalize(2.0 * gbuffer_sample.rgb - 1.0); - mediump float gbuffer_specular_exponent = gbuffer_sample.a * 100.0; - - mediump vec4 clip_space_vertex_position = vec4( - gl_FragCoord.xy / viewport.zw * 2.0 - 1.0, - texture(gbuffer_depth, gbuffer_uv).r * 2.0 - 1.0, - 1.0 - ); - - - mediump vec4 view_space_vertex_position = inv_projection_matrix * clip_space_vertex_position; - view_space_vertex_position.xyz /= view_space_vertex_position.w; - - mediump float light_distance = max(0.0, distance(view_space_model_origin.xyz, view_space_vertex_position.xyz) - light_decay_start); - mediump float light_attenuation = (light_intensity / ((light_distance + 1.0) * (light_distance + 1.0)) - light_cutoff) / (1.0 - light_cutoff); - mediump vec3 light_vec = normalize(view_space_model_origin.xyz - view_space_vertex_position.xyz); - mediump float lamberFactor = dot(light_vec, gbuffer_normal) * 0.2; - - mediump float specularFactor = 0.0; - //if(gbuffer_specular_exponent > 0.0) { - mediump vec3 halfVec = normalize((normalize(- view_space_vertex_position.xyz) + light_vec)); - specularFactor = pow(dot(halfVec,gbuffer_normal), gbuffer_specular_exponent); - //} - - colorOut = vec4(light_color * lamberFactor, specularFactor) * light_attenuation; -} diff --git a/kraken_standard_assets_osx/Shaders/light_point_osx.vsh b/kraken_standard_assets_osx/Shaders/light_point_osx.vsh deleted file mode 100755 index 84c6687..0000000 --- a/kraken_standard_assets_osx/Shaders/light_point_osx.vsh +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; - gl_Position.z = max(gl_Position.z / gl_Position.w, 0.00) * gl_Position.w; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/occlusion_test_osx.fsh b/kraken_standard_assets_osx/Shaders/occlusion_test_osx.fsh deleted file mode 100755 index 7e484ab..0000000 --- a/kraken_standard_assets_osx/Shaders/occlusion_test_osx.fsh +++ /dev/null @@ -1,37 +0,0 @@ -// -// flare.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -void main() { - //colorOut = vec4(0.00, 0.00, 0.00, 0.00); - colorOut = vec4(0.00, 0.00, 0.00, 0.00); -} diff --git a/kraken_standard_assets_osx/Shaders/occlusion_test_osx.vsh b/kraken_standard_assets_osx/Shaders/occlusion_test_osx.vsh deleted file mode 100755 index f095553..0000000 --- a/kraken_standard_assets_osx/Shaders/occlusion_test_osx.vsh +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/simple_blit_osx.fsh b/kraken_standard_assets_osx/Shaders/simple_blit_osx.fsh deleted file mode 100755 index f91ab2a..0000000 --- a/kraken_standard_assets_osx/Shaders/simple_blit_osx.fsh +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -in mediump vec2 textureCoordinate; - -uniform sampler2D diffuseTexture; - -void main() -{ - colorOut = texture(diffuseTexture, textureCoordinate); -} diff --git a/kraken_standard_assets_osx/Shaders/simple_blit_osx.vsh b/kraken_standard_assets_osx/Shaders/simple_blit_osx.vsh deleted file mode 100755 index ca983bc..0000000 --- a/kraken_standard_assets_osx/Shaders/simple_blit_osx.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out mediump vec2 textureCoordinate; - -in vec4 vertex_position; -in lowp vec4 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; - textureCoordinate = vertex_uv.xy; -} diff --git a/kraken_standard_assets_osx/Shaders/sky_box_osx.fsh b/kraken_standard_assets_osx/Shaders/sky_box_osx.fsh deleted file mode 100755 index 0876d09..0000000 --- a/kraken_standard_assets_osx/Shaders/sky_box_osx.fsh +++ /dev/null @@ -1,40 +0,0 @@ -// -// sky_box.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -uniform samplerCube diffuseTexture; - -in mediump vec3 texCoord; - -void main() { - colorOut = textureCube(diffuseTexture, normalize(texCoord)); -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/sky_box_osx.vsh b/kraken_standard_assets_osx/Shaders/sky_box_osx.vsh deleted file mode 100755 index c6b6207..0000000 --- a/kraken_standard_assets_osx/Shaders/sky_box_osx.vsh +++ /dev/null @@ -1,46 +0,0 @@ -// -// sky_box.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// -// - -in vec4 vertex_position; - -out mediump vec3 texCoord; -uniform highp mat4 inv_mvp_matrix_no_translate; // Inverse of the model-view-projection matrix, without view translation component -uniform mediump vec4 viewport; - -void main() -{ - gl_Position = vec4(vertex_position.xy, 1.0, 1.0); - - vec4 t = inv_mvp_matrix_no_translate * vec4(vertex_position.xy, 1.0, 1.0); - t *= 1.0 / t.w; - texCoord = vec3(t); -} diff --git a/kraken_standard_assets_osx/Shaders/sprite_osx.fsh b/kraken_standard_assets_osx/Shaders/sprite_osx.fsh deleted file mode 100755 index feb61b3..0000000 --- a/kraken_standard_assets_osx/Shaders/sprite_osx.fsh +++ /dev/null @@ -1,40 +0,0 @@ -// -// sprite.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -in mediump vec2 texCoord; -uniform sampler2D diffuseTexture; -uniform lowp float material_alpha; - -void main() { - colorOut = vec4(vec3(texture(diffuseTexture, texCoord)), 1.0) * material_alpha; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/sprite_osx.vsh b/kraken_standard_assets_osx/Shaders/sprite_osx.vsh deleted file mode 100755 index b367a1c..0000000 --- a/kraken_standard_assets_osx/Shaders/sprite_osx.vsh +++ /dev/null @@ -1,41 +0,0 @@ -// -// sprite.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in mediump vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices -uniform mediump vec4 viewport; - -out mediump vec2 texCoord; - -void main() { - texCoord = vertex_uv; - gl_Position = mvp_matrix * vec4(vertex_uv.x * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 1.0); -} diff --git a/kraken_standard_assets_osx/Shaders/visualize_overlay_osx.fsh b/kraken_standard_assets_osx/Shaders/visualize_overlay_osx.fsh deleted file mode 100755 index de29a57..0000000 --- a/kraken_standard_assets_osx/Shaders/visualize_overlay_osx.fsh +++ /dev/null @@ -1,37 +0,0 @@ -// -// visualize_overlay.fsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -void main() { - colorOut = vec4(0.0, 0.05, 0.05, 0.0); -} - diff --git a/kraken_standard_assets_osx/Shaders/visualize_overlay_osx.vsh b/kraken_standard_assets_osx/Shaders/visualize_overlay_osx.vsh deleted file mode 100755 index b508cd3..0000000 --- a/kraken_standard_assets_osx/Shaders/visualize_overlay_osx.vsh +++ /dev/null @@ -1,38 +0,0 @@ -// -// visualize_overlay.vsh -// KREngine -// -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in vec4 vertex_position; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices - -void main() -{ - gl_Position = mvp_matrix * vertex_position; -} \ No newline at end of file diff --git a/kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.fsh b/kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.fsh deleted file mode 100755 index ac905b1..0000000 --- a/kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.fsh +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -in mediump vec4 shadowMapCoord1; -uniform sampler2DShadow shadowTexture1; -uniform lowp sampler2D depthFrame; -uniform mediump vec4 viewport; -uniform mediump vec3 light_color; - -void main() -{ - if(gl_FragCoord.z > texture(depthFrame, vec2(gl_FragCoord.xy / viewport.zw)).r) discard; - - colorOut = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1); -} diff --git a/kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.vsh b/kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.vsh deleted file mode 100755 index 976996a..0000000 --- a/kraken_standard_assets_osx/Shaders/volumetric_fog_downsampled_osx.vsh +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in highp vec4 vertex_position; -uniform highp mat4 inv_mvp_matrix; - -uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space - -uniform highp mat4 shadow_mvp1; -out mediump vec4 shadowMapCoord1; - -uniform highp mat4 projection_matrix; - -void main() -{ - highp vec4 d = projection_matrix * vec4(0.0, 0.0, slice_depth_scale.x + vertex_position.z * slice_depth_scale.y, 1.0); - d /= d.w; - gl_Position = vec4(vertex_position.x, vertex_position.y, d.z, 1.0); - - - shadowMapCoord1 = inv_mvp_matrix * gl_Position; - shadowMapCoord1 /= shadowMapCoord1.w; - shadowMapCoord1.w = 1.0; - shadowMapCoord1 = shadow_mvp1 * shadowMapCoord1; - -} diff --git a/kraken_standard_assets_osx/Shaders/volumetric_fog_osx.fsh b/kraken_standard_assets_osx/Shaders/volumetric_fog_osx.fsh deleted file mode 100755 index 362b452..0000000 --- a/kraken_standard_assets_osx/Shaders/volumetric_fog_osx.fsh +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -out vec4 colorOut; - -in mediump vec4 shadowMapCoord1; -uniform sampler2DShadow shadowTexture1; -uniform mediump vec3 light_color; - -void main() -{ - colorOut = vec4(light_color, 1.0) * shadow2DProj(shadowTexture1, shadowMapCoord1); -} diff --git a/kraken_standard_assets_osx/Shaders/volumetric_fog_osx.vsh b/kraken_standard_assets_osx/Shaders/volumetric_fog_osx.vsh deleted file mode 100755 index 4d8183d..0000000 --- a/kraken_standard_assets_osx/Shaders/volumetric_fog_osx.vsh +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2012 Kearwood Gilbert. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of Kearwood Gilbert. -// - -in highp vec4 vertex_position; -uniform highp mat4 inv_mvp_matrix; - -uniform highp vec2 slice_depth_scale; // First component is the depth for the nearest plane, in view space. Second component is the distance between planes, in view space - -uniform highp mat4 shadow_mvp1; -out mediump vec4 shadowMapCoord1; - -uniform highp mat4 projection_matrix; - - -void main() -{ - highp vec4 d = projection_matrix * vec4(0.0, 0.0, slice_depth_scale.x + vertex_position.z * slice_depth_scale.y, 1.0); - d /= d.w; - gl_Position = vec4(vertex_position.x, vertex_position.y, d.z, 1.0); - - - shadowMapCoord1 = inv_mvp_matrix * gl_Position; - shadowMapCoord1 /= shadowMapCoord1.w; - shadowMapCoord1.w = 1.0; - shadowMapCoord1 = shadow_mvp1 * shadowMapCoord1; - -} diff --git a/kraken_standard_assets_tvos/Resources-Info.plist b/kraken_standard_assets_tvos/Resources-Info.plist deleted file mode 100755 index c71a54e..0000000 --- a/kraken_standard_assets_tvos/Resources-Info.plist +++ /dev/null @@ -1,46 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - CFPlugInDynamicRegisterFunction - - CFPlugInDynamicRegistration - NO - CFPlugInFactories - - 00000000-0000-0000-0000-000000000000 - MyFactoryFunction - - CFPlugInTypes - - 00000000-0000-0000-0000-000000000000 - - 00000000-0000-0000-0000-000000000000 - - - CFPlugInUnloadFunction - - NSHumanReadableCopyright - Copyright © 2013 Kearwood Software. All rights reserved. - - diff --git a/standard_assets/shaders/frag.spv b/standard_assets/shaders/frag.spv deleted file mode 100644 index e41552f246398dcd14195c31e8f48b22ae881928..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 672 zcmY+ATT22_6orqDI+o=nyAVNWJq99S5kx`t;ENDc54{bO9?ddG<^uhUer_*8>l>A9 z%XXi&&YHFNK2G-7HBQF3rf7D|JZdIuGCGz_A+6osW3Ls(gI4FPjiPLvREVacFLSEo zhd-Wjv8JpktJ1-{N=Lt}>X$ysNzv_jHxIX7WM_Wp$JUEp{eca=;N{Ks2> zT@Zw7qDiFfrV|=-h=Br($5D#@a8sB!;GTV#`non{*Jir4Nzc1F7sNG`d(!hJVCHY= zzo^Qq!e1^hyTI*ht94cM^jnQ3K9I7c3v~ExEJSelf!Tqee?=8P=0smr#S0!in4REG zgwfWO#JOIN@0gun#&0os)hn^|EGy{;#&b)F-?KJk$89AVc)akwmJ>U3_oL1i%3pxu BIaB}u