Namespaces | Defines | Functions | Variables
RenderTiny_D3D1X_Device.cpp File Reference
#include "Kernel/OVR_Log.h"
#include "Kernel/OVR_Std.h"
#include "RenderTiny_D3D1X_Device.h"
#include <d3dcompiler.h>
Include dependency graph for RenderTiny_D3D1X_Device.cpp:

Go to the source code of this file.

Namespaces

namespace  OVR
namespace  OVR::RenderTiny
namespace  OVR::RenderTiny::D3D10

Defines

#define LIGHTING_COMMON

Functions

static OVR::RenderTiny::D3D10::D3D1x_ (INPUT_ELEMENT_DESC) ModelVertexDesc[]
static int OVR::RenderTiny::D3D10::GetDepthStateIndex (bool enable, bool write, RenderDevice::CompareFunc func)
BOOL CALLBACK OVR::RenderTiny::D3D10::MonitorEnumFunc (HMONITOR hMonitor, HDC, LPRECT, LPARAM dwData)

Variables

static const char * OVR::RenderTiny::D3D10::DirectVertexShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::FShaderSrcs [FShader_Count]
static const char * OVR::RenderTiny::D3D10::GouraudPixelShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::LitSolidPixelShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::LitTexturePixelShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::PostProcessPixelShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::PostProcessPixelShaderWithChromAbSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::PostProcessVertexShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::SolidPixelShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::StdVertexShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::TexturePixelShaderSrc = "}\n"
static const char * OVR::RenderTiny::D3D10::VShaderSrcs [VShader_Count]

Define Documentation

#define LIGHTING_COMMON
Value:
"cbuffer Lighting : register(b1)\n" \
    "{\n"                               \
    "    float3 Ambient;\n"             \
    "    float3 LightPos[8];\n"         \
    "    float4 LightColor[8];\n"       \
    "    float  LightCount;\n"          \
    "};\n"                              \
    "struct Varyings\n"                 \
    "{\n"                                       \
    "   float4 Position : SV_Position;\n"       \
    "   float4 Color    : COLOR0;\n"            \
    "   float2 TexCoord : TEXCOORD0;\n"         \
    "   float3 Normal   : NORMAL;\n"            \
    "   float3 VPos     : TEXCOORD4;\n"         \
    "};\n"                                      \
    "float4 DoLight(Varyings v)\n"              \
    "{\n"                                       \
    "   float3 norm = normalize(v.Normal);\n"   \
    "   float3 light = Ambient;\n"              \
    "   for (uint i = 0; i < LightCount; i++)\n"\
    "   {\n"                                        \
    "       float3 ltp = (LightPos[i] - v.VPos);\n" \
    "       float  ldist = dot(ltp,ltp);\n"         \
    "       ltp = normalize(ltp);\n"                \
    "       light += saturate(LightColor[i] * v.Color.rgb * dot(norm, ltp) / sqrt(ldist));\n"\
    "   }\n"                                        \
    "   return float4(light, v.Color.a);\n"         \
    "}\n"

Definition at line 127 of file RenderTiny_D3D1X_Device.cpp.



oculus_sdk
Author(s):
autogenerated on Mon Oct 6 2014 03:01:19