From b7e3461e1a7119333856f44f05c08d137b8d1948 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 28 May 2015 12:21:38 -0700 Subject: [PATCH 1/9] restore _created magic --- libraries/entities/src/EntityItem.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index e0297fe7d4..64196d1c35 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -957,9 +957,6 @@ bool EntityItem::setProperties(const EntityItemProperties& properties) { #endif setLastEdited(now); somethingChangedNotification(); // notify derived classes that something has changed - if (_created == UNKNOWN_CREATED_TIME) { - _created = now; - } if (getDirtyFlags() & (EntityItem::DIRTY_TRANSFORM | EntityItem::DIRTY_VELOCITIES)) { // anything that sets the transform or velocity must update _lastSimulated which is used // for kinematic extrapolation (e.g. we want to extrapolate forward from this moment @@ -968,6 +965,16 @@ bool EntityItem::setProperties(const EntityItemProperties& properties) { } } + // timestamps + quint64 timestamp = properties.getCreated(); + if (_created == UNKNOWN_CREATED_TIME && timestamp != UNKNOWN_CREATED_TIME) { + quint64 now = usecTimestampNow(); + if (timestamp > now) { + timestamp = now; + } + _created = timestamp; + } + return somethingChanged; } From b90d35c0c0ed59d722d9f81b07f6d77674a34ac4 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 28 May 2015 12:22:17 -0700 Subject: [PATCH 2/9] restore code to fix box entites not rendering boxes wouldn't render when in an otherwise empty domain --- libraries/render-utils/src/DeferredLightingEffect.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 795b2a4389..54e5388ec8 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -93,16 +93,16 @@ void DeferredLightingEffect::init(AbstractViewStateInterface* viewState) { } void DeferredLightingEffect::bindSimpleProgram() { - // DependencyManager::get()->setPrimaryDrawBuffers(true, true, true); + DependencyManager::get()->setPrimaryDrawBuffers(true, true, true); _simpleProgram.bind(); _simpleProgram.setUniformValue(_glowIntensityLocation, DependencyManager::get()->getIntensity()); - // glDisable(GL_BLEND); + glDisable(GL_BLEND); } void DeferredLightingEffect::releaseSimpleProgram() { - // glEnable(GL_BLEND); + glEnable(GL_BLEND); _simpleProgram.release(); - // DependencyManager::get()->setPrimaryDrawBuffers(true, false, false); + DependencyManager::get()->setPrimaryDrawBuffers(true, false, false); } void DeferredLightingEffect::renderSolidSphere(float radius, int slices, int stacks, const glm::vec4& color) { From 0c6de897f55c7c61d86420bad227cdf08baf2a6f Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 28 May 2015 12:26:29 -0700 Subject: [PATCH 3/9] replace tab with spaces --- tests/physics/src/MeshMassPropertiesTests.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/physics/src/MeshMassPropertiesTests.h b/tests/physics/src/MeshMassPropertiesTests.h index ab352bfce2..07cd774d34 100644 --- a/tests/physics/src/MeshMassPropertiesTests.h +++ b/tests/physics/src/MeshMassPropertiesTests.h @@ -15,7 +15,7 @@ namespace MeshMassPropertiesTests{ void testParallelAxisTheorem(); void testTetrahedron(); void testOpenTetrahedonMesh(); - void testClosedTetrahedronMesh(); + void testClosedTetrahedronMesh(); void testBoxAsMesh(); void runAllTests(); } From 131827a82b7a04e4e77354d9cc2ea36fe49acb96 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 28 May 2015 14:27:49 -0700 Subject: [PATCH 4/9] libraries/entities doesn't need polyvox, only libraries/entities-renderer --- libraries/entities-renderer/CMakeLists.txt | 6 +++++- libraries/entities/CMakeLists.txt | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/entities-renderer/CMakeLists.txt b/libraries/entities-renderer/CMakeLists.txt index 6c7fa04a21..029d742b09 100644 --- a/libraries/entities-renderer/CMakeLists.txt +++ b/libraries/entities-renderer/CMakeLists.txt @@ -3,7 +3,7 @@ set(TARGET_NAME entities-renderer) # use setup_hifi_library macro to setup our project and link appropriate Qt modules setup_hifi_library(Widgets OpenGL Network Script) -add_dependency_external_projects(glm) +add_dependency_external_projects(glm polyvox) find_package(GLM REQUIRED) target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS}) @@ -12,4 +12,8 @@ find_package(Bullet REQUIRED) target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) +find_package(PolyVox REQUIRED) +target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${POLYVOX_INCLUDE_DIRS}) +target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES}) + link_hifi_libraries(shared gpu script-engine render-utils) diff --git a/libraries/entities/CMakeLists.txt b/libraries/entities/CMakeLists.txt index c4334edb3a..d21906fa3f 100644 --- a/libraries/entities/CMakeLists.txt +++ b/libraries/entities/CMakeLists.txt @@ -7,14 +7,10 @@ add_dependency_external_projects(glm) find_package(GLM REQUIRED) target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS}) -add_dependency_external_projects(bullet polyvox) +add_dependency_external_projects(bullet) find_package(Bullet REQUIRED) target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) -find_package(PolyVox REQUIRED) -target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${POLYVOX_INCLUDE_DIRS}) -target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES}) - link_hifi_libraries(avatars shared octree gpu model fbx networking animation environment) From 94edb72b47a497aad1f73b0b04d574c3a2bcab07 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 28 May 2015 14:30:06 -0700 Subject: [PATCH 5/9] oops --- libraries/entities-renderer/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/entities-renderer/CMakeLists.txt b/libraries/entities-renderer/CMakeLists.txt index 029d742b09..a94bfb5f97 100644 --- a/libraries/entities-renderer/CMakeLists.txt +++ b/libraries/entities-renderer/CMakeLists.txt @@ -3,7 +3,7 @@ set(TARGET_NAME entities-renderer) # use setup_hifi_library macro to setup our project and link appropriate Qt modules setup_hifi_library(Widgets OpenGL Network Script) -add_dependency_external_projects(glm polyvox) +add_dependency_external_projects(glm) find_package(GLM REQUIRED) target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS}) @@ -12,6 +12,7 @@ find_package(Bullet REQUIRED) target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) +add_dependency_external_projects(polyvox) find_package(PolyVox REQUIRED) target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${POLYVOX_INCLUDE_DIRS}) target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES}) From 51570aac68f8049aa66f57f5fa2c3ee98c3416ba Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 29 May 2015 16:49:31 +0200 Subject: [PATCH 6/9] Add simple textured pipeline --- .../src/DeferredLightingEffect.cpp | 24 +++++++---- .../render-utils/src/DeferredLightingEffect.h | 3 +- libraries/render-utils/src/simple.slf | 2 + libraries/render-utils/src/simple.slv | 2 + .../render-utils/src/simple_textured.slf | 41 +++++++++++++++++++ 5 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 libraries/render-utils/src/simple_textured.slf diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 00c9a13387..202c6c6a02 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -28,6 +28,7 @@ #include "simple_vert.h" #include "simple_frag.h" +#include "simple_textured_frag.h" #include "deferred_light_vert.h" #include "deferred_light_limited_vert.h" @@ -50,13 +51,16 @@ static const std::string glowIntensityShaderHandle = "glowIntensity"; void DeferredLightingEffect::init(AbstractViewStateInterface* viewState) { - auto vertexShader = gpu::ShaderPointer(gpu::Shader::createVertex(std::string(simple_vert))); - auto pixelShader = gpu::ShaderPointer(gpu::Shader::createPixel(std::string(simple_frag))); + auto VS = gpu::ShaderPointer(gpu::Shader::createVertex(std::string(simple_vert))); + auto PS = gpu::ShaderPointer(gpu::Shader::createPixel(std::string(simple_frag))); + auto PSTextured = gpu::ShaderPointer(gpu::Shader::createPixel(std::string(simple_textured_frag))); + + gpu::ShaderPointer program = gpu::ShaderPointer(gpu::Shader::createProgram(VS, PS)); + gpu::ShaderPointer programTextured = gpu::ShaderPointer(gpu::Shader::createProgram(VS, PSTextured)); + gpu::Shader::BindingSet slotBindings; - slotBindings.insert(gpu::Shader::Binding(glowIntensityShaderHandle, 0)); - - gpu::ShaderPointer program = gpu::ShaderPointer(gpu::Shader::createProgram(vertexShader, pixelShader)); gpu::Shader::makeProgram(*program, slotBindings); + gpu::Shader::makeProgram(*programTextured, slotBindings); gpu::StatePointer state = gpu::StatePointer(new gpu::State()); state->setCullMode(gpu::State::CULL_BACK); @@ -65,6 +69,7 @@ void DeferredLightingEffect::init(AbstractViewStateInterface* viewState) { gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA, gpu::State::FACTOR_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::ONE); _simpleProgram = gpu::PipelinePointer(gpu::Pipeline::create(program, state)); + _simpleProgramTextured = gpu::PipelinePointer(gpu::Pipeline::create(programTextured, state)); _viewState = viewState; loadLightProgram(directional_light_frag, false, _directionalLight, _directionalLightLocations); @@ -101,9 +106,14 @@ void DeferredLightingEffect::init(AbstractViewStateInterface* viewState) { lp->setAmbientSpherePreset(gpu::SphericalHarmonics::Preset(_ambientLightMode % gpu::SphericalHarmonics::NUM_PRESET)); } -void DeferredLightingEffect::bindSimpleProgram(gpu::Batch& batch) { +void DeferredLightingEffect::bindSimpleProgram(gpu::Batch& batch, bool textured) { DependencyManager::get()->setPrimaryDrawBuffers(batch, true, true, true); - batch.setPipeline(_simpleProgram); + + if (textured) { + batch.setPipeline(_simpleProgramTextured); + } else { + batch.setPipeline(_simpleProgram); + } } void DeferredLightingEffect::releaseSimpleProgram(gpu::Batch& batch) { diff --git a/libraries/render-utils/src/DeferredLightingEffect.h b/libraries/render-utils/src/DeferredLightingEffect.h index 33728ab15a..58e5e35829 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.h +++ b/libraries/render-utils/src/DeferredLightingEffect.h @@ -34,7 +34,7 @@ public: void init(AbstractViewStateInterface* viewState); /// Sets up the state necessary to render static untextured geometry with the simple program. - void bindSimpleProgram(gpu::Batch& batch); + void bindSimpleProgram(gpu::Batch& batch, bool textured = false); /// Tears down the state necessary to render static untextured geometry with the simple program. void releaseSimpleProgram(gpu::Batch& batch); @@ -100,6 +100,7 @@ private: static void loadLightProgram(const char* fragSource, bool limited, ProgramObject& program, LightLocations& locations); gpu::PipelinePointer _simpleProgram; + gpu::PipelinePointer _simpleProgramTextured; ProgramObject _directionalSkyboxLight; LightLocations _directionalSkyboxLightLocations; diff --git a/libraries/render-utils/src/simple.slf b/libraries/render-utils/src/simple.slf index 4e1a09fb92..5512eaeb74 100644 --- a/libraries/render-utils/src/simple.slf +++ b/libraries/render-utils/src/simple.slf @@ -14,6 +14,8 @@ <@include DeferredBufferWrite.slh@> +uniform float glowIntensity; + // the interpolated normal varying vec4 interpolatedNormal; diff --git a/libraries/render-utils/src/simple.slv b/libraries/render-utils/src/simple.slv index 1460058892..380734e70c 100644 --- a/libraries/render-utils/src/simple.slv +++ b/libraries/render-utils/src/simple.slv @@ -20,6 +20,8 @@ varying vec4 interpolatedNormal; void main(void) { + gl_TexCoord[0] = gl_MultiTexCoord0; + // pass along the diffuse color gl_FrontColor = gl_Color; diff --git a/libraries/render-utils/src/simple_textured.slf b/libraries/render-utils/src/simple_textured.slf new file mode 100644 index 0000000000..67747125db --- /dev/null +++ b/libraries/render-utils/src/simple_textured.slf @@ -0,0 +1,41 @@ +<@include gpu/Config.slh@> +<$VERSION_HEADER$> +// Generated on <$_SCRIBE_DATE$> +// +// simple.frag +// fragment shader +// +// Created by Clément Brisset on 5/29/15. +// Copyright 2014 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// + +<@include DeferredBufferWrite.slh@> + +// the diffuse texture +uniform sampler2D originalTexture; + +// the interpolated normal +varying vec4 interpolatedNormal; + +// the glow intensity +//uniform float glowIntensity; + +void main(void) { + /* // set the diffuse, normal, specular data + gl_FragData[0] = vec4(gl_Color.rgb, glowIntensity); + gl_FragData[1] = normalize(normal) * 0.5 + vec4(0.5, 0.5, 0.5, 1.0); + gl_FragData[2] = vec4(gl_FrontMaterial.specular.rgb, gl_FrontMaterial.shininess / 128.0); + */ + + vec4 texel = texture2D(originalTexture, gl_TexCoord[0].st); + + packDeferredFragment( + normalize(interpolatedNormal.xyz), + glowIntensity * texel.a, + gl_Color.rgb * texel.rgb, + gl_FrontMaterial.specular.rgb, + gl_FrontMaterial.shininess); +} \ No newline at end of file From 0770f88606a33ec75f61137f91a8f3926f9a31ce Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 29 May 2015 16:50:11 +0200 Subject: [PATCH 7/9] Add glTexParamteri to GLBackend/Batch --- libraries/gpu/src/gpu/Batch.h | 4 +++- libraries/gpu/src/gpu/GLBackend.cpp | 17 +++++++++++++++++ libraries/gpu/src/gpu/GLBackend.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/Batch.h b/libraries/gpu/src/gpu/Batch.h index b369c05646..b91dea6b05 100644 --- a/libraries/gpu/src/gpu/Batch.h +++ b/libraries/gpu/src/gpu/Batch.h @@ -143,7 +143,8 @@ public: void _glBindTexture(GLenum target, GLuint texture); void _glActiveTexture(GLenum texture); - + void _glTexParameteri(GLenum target, GLenum pname, GLint param); + void _glDrawBuffers(GLsizei n, const GLenum* bufs); void _glUseProgram(GLuint program); @@ -201,6 +202,7 @@ public: COMMAND_glBindTexture, COMMAND_glActiveTexture, + COMMAND_glTexParameteri, COMMAND_glDrawBuffers, diff --git a/libraries/gpu/src/gpu/GLBackend.cpp b/libraries/gpu/src/gpu/GLBackend.cpp index a84af10a82..0dde9699f2 100644 --- a/libraries/gpu/src/gpu/GLBackend.cpp +++ b/libraries/gpu/src/gpu/GLBackend.cpp @@ -54,6 +54,7 @@ GLBackend::CommandCall GLBackend::_commandCalls[Batch::NUM_COMMANDS] = (&::gpu::GLBackend::do_glBindTexture), (&::gpu::GLBackend::do_glActiveTexture), + (&::gpu::GLBackend::do_glTexParameteri), (&::gpu::GLBackend::do_glDrawBuffers), @@ -381,6 +382,22 @@ void GLBackend::do_glActiveTexture(Batch& batch, uint32 paramOffset) { (void) CHECK_GL_ERROR(); } +void Batch::_glTexParameteri(GLenum target, GLenum pname, GLint param) { + ADD_COMMAND_GL(glTexParameteri); + + _params.push_back(param); + _params.push_back(pname); + _params.push_back(target); + + DO_IT_NOW(glTexParameteri, 3); +} +void GLBackend::do_glTexParameteri(Batch& batch, uint32 paramOffset) { + glTexParameteri(batch._params[paramOffset + 2]._uint, + batch._params[paramOffset + 1]._uint, + batch._params[paramOffset + 0]._int); + (void) CHECK_GL_ERROR(); +} + void Batch::_glDrawBuffers(GLsizei n, const GLenum* bufs) { ADD_COMMAND_GL(glDrawBuffers); diff --git a/libraries/gpu/src/gpu/GLBackend.h b/libraries/gpu/src/gpu/GLBackend.h index 22266079bc..6c70502458 100644 --- a/libraries/gpu/src/gpu/GLBackend.h +++ b/libraries/gpu/src/gpu/GLBackend.h @@ -358,6 +358,7 @@ protected: void do_glBindTexture(Batch& batch, uint32 paramOffset); void do_glActiveTexture(Batch& batch, uint32 paramOffset); + void do_glTexParameteri(Batch& batch, uint32 paramOffset); void do_glDrawBuffers(Batch& batch, uint32 paramOffset); From 1d336b76dee8adb9ec6ba6a6ad05856cb7dc711a Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 29 May 2015 16:51:48 +0200 Subject: [PATCH 8/9] Web entities render in Batch --- .../src/RenderableWebEntityItem.cpp | 43 +++++++------------ 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp index d9b9811015..4ca39a85b0 100644 --- a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp @@ -148,36 +148,23 @@ void RenderableWebEntityItem::render(RenderArgs* args) { currentContext->makeCurrent(currentSurface); PerformanceTimer perfTimer("RenderableWebEntityItem::render"); - assert(getType() == EntityTypes::Web); - glm::vec3 position = getPosition(); - glm::vec3 dimensions = getDimensions(); - glm::vec3 halfDimensions = dimensions / 2.0f; - glm::quat rotation = getRotation(); + Q_ASSERT(getType() == EntityTypes::Web); + static const glm::vec2 texMin(0.0f); + static const glm::vec2 texMax(1.0f); + glm::vec2 topLeft(-0.5f -0.5f); + glm::vec2 bottomRight(0.5f, 0.5f); - glPushMatrix(); - { - glTranslatef(position.x, position.y, position.z); - glm::vec3 axis = glm::axis(rotation); - glRotatef(glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z); - - static const glm::vec2 texMin(0); - static const glm::vec2 texMax(1); - glm::vec2 topLeft(-halfDimensions.x, -halfDimensions.y); - glm::vec2 bottomRight(halfDimensions.x, halfDimensions.y); - if (_texture) { - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, _texture); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - } - DependencyManager::get()->renderQuad( - topLeft, bottomRight, texMin, texMax, glm::vec4(1)); - if (_texture) { - glBindTexture(GL_TEXTURE_2D, 0); - glEnable(GL_TEXTURE_2D); - } + Q_ASSERT(args->_batch); + gpu::Batch& batch = *args->_batch; + batch.setModelTransform(getTransformToCenter()); + if (_texture) { + batch._glBindTexture(GL_TEXTURE_2D, _texture); + batch._glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + batch._glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); } - glPopMatrix(); + DependencyManager::get()->bindSimpleProgram(batch, true); + DependencyManager::get()->renderQuad(batch, topLeft, bottomRight, texMin, texMax, glm::vec4(1.0f)); + DependencyManager::get()->releaseSimpleProgram(batch); } void RenderableWebEntityItem::setSourceUrl(const QString& value) { From 212007aa6f4f2e425d852315b984ad1843608240 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 29 May 2015 16:53:53 +0200 Subject: [PATCH 9/9] Cleanup simple fragmen shaders --- libraries/render-utils/src/simple.slf | 11 ----------- libraries/render-utils/src/simple_textured.slf | 9 --------- 2 files changed, 20 deletions(-) diff --git a/libraries/render-utils/src/simple.slf b/libraries/render-utils/src/simple.slf index 5512eaeb74..bbbb44cc51 100644 --- a/libraries/render-utils/src/simple.slf +++ b/libraries/render-utils/src/simple.slf @@ -14,21 +14,10 @@ <@include DeferredBufferWrite.slh@> -uniform float glowIntensity; - // the interpolated normal varying vec4 interpolatedNormal; -// the glow intensity -//uniform float glowIntensity; - void main(void) { - /* // set the diffuse, normal, specular data - gl_FragData[0] = vec4(gl_Color.rgb, glowIntensity); - gl_FragData[1] = normalize(normal) * 0.5 + vec4(0.5, 0.5, 0.5, 1.0); - gl_FragData[2] = vec4(gl_FrontMaterial.specular.rgb, gl_FrontMaterial.shininess / 128.0); - */ - packDeferredFragment( normalize(interpolatedNormal.xyz), glowIntensity, diff --git a/libraries/render-utils/src/simple_textured.slf b/libraries/render-utils/src/simple_textured.slf index 67747125db..7444d512e4 100644 --- a/libraries/render-utils/src/simple_textured.slf +++ b/libraries/render-utils/src/simple_textured.slf @@ -20,16 +20,7 @@ uniform sampler2D originalTexture; // the interpolated normal varying vec4 interpolatedNormal; -// the glow intensity -//uniform float glowIntensity; - void main(void) { - /* // set the diffuse, normal, specular data - gl_FragData[0] = vec4(gl_Color.rgb, glowIntensity); - gl_FragData[1] = normalize(normal) * 0.5 + vec4(0.5, 0.5, 0.5, 1.0); - gl_FragData[2] = vec4(gl_FrontMaterial.specular.rgb, gl_FrontMaterial.shininess / 128.0); - */ - vec4 texel = texture2D(originalTexture, gl_TexCoord[0].st); packDeferredFragment(