Namespaces | Defines | Variables
RenderTiny_GL_Device.cpp File Reference
#include "RenderTiny_GL_Device.h"
#include "Kernel/OVR_Log.h"
Include dependency graph for RenderTiny_GL_Device.cpp:

Go to the source code of this file.

Namespaces

namespace  OVR
namespace  OVR::RenderTiny
namespace  OVR::RenderTiny::GL

Defines

#define LIGHTING_COMMON

Variables

static const char * OVR::RenderTiny::GL::DirectVertexShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::FShaderSrcs [FShader_Count]
static const char * OVR::RenderTiny::GL::GouraudFragShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::LitSolidFragShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::LitTextureFragShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::PostProcessFragShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::PostProcessFullFragShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::PostProcessVertexShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::SolidFragShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::StdVertexShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::TextureFragShaderSrc = "}\n"
static const char * OVR::RenderTiny::GL::VShaderSrcs [VShader_Count]

Define Documentation

#define LIGHTING_COMMON
Value:
"uniform   vec3 Ambient;\n"                                               \
    "uniform   vec4 LightPos[8];\n"                                           \
    "uniform   vec4 LightColor[8];\n"                                         \
    "uniform   float LightCount;\n"                                          \
    "varying   vec4 oColor;\n"                                                  \
    "varying   vec2 oTexCoord;\n"                                               \
    "varying   vec3 oNormal;\n"                                                 \
    "varying   vec3 oVPos;\n"                                                   \
    "vec4 DoLight()\n"                                        \
    "{\n"                                                               \
    "   vec3 norm = normalize(oNormal);\n"                             \
    "   vec3 light = Ambient;\n"                                        \
    "   for (int i = 0; i < int(LightCount); i++)\n"                \
    "   {\n"                                                            \
    "       vec3 ltp = (LightPos[i].xyz - oVPos);\n"              \
    "       float  ldist = length(ltp);\n"                             \
    "       ltp = normalize(ltp);\n"                             \
    "       light += clamp(LightColor[i].rgb * oColor.rgb * (dot(norm, ltp) / ldist), 0.0,1.0);\n" \
    "   }\n"                                                            \
    "   return vec4(light, oColor.a);\n"                               \
    "}\n"

Definition at line 93 of file RenderTiny_GL_Device.cpp.



oculus_sdk
Author(s):
autogenerated on Fri Aug 28 2015 11:53:11