/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// EXTERNAL INCLUDES
#include <dali-toolkit/dali-toolkit.h>
+#include <dali/public-api/rendering/shader.h>
// INTERNAL INCLUDES
-#include "renderer-stencil-shaders.h"
+#include "generated/render-stencil-frag.h"
+#include "generated/render-stencil-textured-frag.h"
+#include "generated/render-stencil-textured-vert.h"
+#include "generated/render-stencil-vert.h"
#include "shared/utility.h"
#include "shared/view.h"
// We need to control the draw order as we are controlling both the stencil and depth buffer per renderer.
const int DEPTH_INDEX_GRANULARITY(10000); ///< This value is the gap in depth-index in-between each renderer.
+// Shader uniforms:
+const char* const COLOR_UNIFORM_NAME("uColor");
+const char* const OBJECT_DIMENSIONS_UNIFORM_NAME("uObjectDimensions");
+const char* const LIGHT_POSITION_UNIFORM_NAME = "uLightPosition";
+const char* const POSITION("aPosition");
+const char* const NORMAL("aNormal");
+const char* const TEXTURE("aTexCoord");
+
} // Anonymous namespace
/**
if(textured)
{
- shader = Shader::New(VERTEX_SHADER_TEXTURED, FRAGMENT_SHADER_TEXTURED);
+ shader = Shader::New(SHADER_RENDER_STENCIL_TEXTURED_VERT, SHADER_RENDER_STENCIL_TEXTURED_FRAG);
}
else
{
- shader = Shader::New(VERTEX_SHADER, FRAGMENT_SHADER);
+ shader = Shader::New(SHADER_RENDER_STENCIL_VERT, SHADER_RENDER_STENCIL_FRAG);
}
// Here we modify the light position based on half the window size as a pre-calculation step.