mirror of https://github.com/qt/qt3d.git
Render: get rid of duplicate phong shaders
These are already stored in extras like all the other default effects Change-Id: Ie31130adc1ecb36ef90fee40923eba774fe5b88b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
8c54e49e6a
commit
6f7c31fb4f
|
|
@ -132,11 +132,6 @@
|
|||
#include <QThread>
|
||||
#include <QWindow>
|
||||
|
||||
static void initResources()
|
||||
{
|
||||
Q_INIT_RESOURCE(render);
|
||||
}
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt3DCore;
|
||||
|
|
@ -158,8 +153,6 @@ QRenderAspectPrivate::QRenderAspectPrivate(QRenderAspect::RenderType type)
|
|||
, m_initialized(false)
|
||||
, m_renderType(type)
|
||||
{
|
||||
initResources();
|
||||
|
||||
// Load the scene parsers
|
||||
loadSceneParsers();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ include (raycasting/raycasting.pri)
|
|||
include (services/services.pri)
|
||||
include (texture/texture.pri)
|
||||
|
||||
RESOURCES += $$PWD/render.qrc
|
||||
|
||||
# Qt3D is free of Q_FOREACH - make sure it stays that way:
|
||||
DEFINES += QT_NO_FOREACH
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>shaders/gl3/phong.vert</file>
|
||||
<file>shaders/gl3/phong.frag</file>
|
||||
<file>shaders/es2/phong.vert</file>
|
||||
<file>shaders/es2/phong.frag</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#define FP highp
|
||||
|
||||
uniform FP vec3 ka; // Ambient reflectivity
|
||||
uniform FP vec3 kd; // Diffuse reflectivity
|
||||
uniform FP vec3 ks; // Specular reflectivity
|
||||
uniform FP float shininess; // Specular shininess factor
|
||||
|
||||
uniform FP vec3 eyePosition;
|
||||
|
||||
varying FP vec3 worldPosition;
|
||||
varying FP vec3 worldNormal;
|
||||
|
||||
#pragma include light.inc.frag
|
||||
|
||||
void main()
|
||||
{
|
||||
FP vec3 diffuseColor, specularColor;
|
||||
adsModel(worldPosition, worldNormal, eyePosition, shininess, diffuseColor, specularColor);
|
||||
gl_FragColor = vec4( ka + kd * diffuseColor + ks * specularColor, 1.0 );
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
attribute vec3 vertexPosition;
|
||||
attribute vec3 vertexNormal;
|
||||
|
||||
varying vec3 worldPosition;
|
||||
varying vec3 worldNormal;
|
||||
|
||||
uniform mat4 modelMatrix;
|
||||
uniform mat3 modelNormalMatrix;
|
||||
uniform mat4 modelViewProjection;
|
||||
|
||||
void main()
|
||||
{
|
||||
worldNormal = normalize( modelNormalMatrix * vertexNormal );
|
||||
worldPosition = vec3( modelMatrix * vec4( vertexPosition, 1.0 ) );
|
||||
|
||||
gl_Position = modelViewProjection * vec4( vertexPosition, 1.0 );
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#version 150 core
|
||||
|
||||
uniform vec3 ka; // Ambient reflectivity
|
||||
uniform vec3 kd; // Diffuse reflectivity
|
||||
uniform vec3 ks; // Specular reflectivity
|
||||
uniform float shininess; // Specular shininess factor
|
||||
|
||||
uniform vec3 eyePosition;
|
||||
|
||||
in vec3 worldPosition;
|
||||
in vec3 worldNormal;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
#pragma include light.inc.frag
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 diffuseColor, specularColor;
|
||||
adsModel(worldPosition, worldNormal, eyePosition, shininess, diffuseColor, specularColor);
|
||||
fragColor = vec4( ka + kd * diffuseColor + ks * specularColor, 1.0 );
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#version 150 core
|
||||
|
||||
in vec3 vertexPosition;
|
||||
in vec3 vertexNormal;
|
||||
|
||||
out vec3 worldPosition;
|
||||
out vec3 worldNormal;
|
||||
|
||||
uniform mat4 modelMatrix;
|
||||
uniform mat3 modelNormalMatrix;
|
||||
uniform mat4 modelViewProjection;
|
||||
|
||||
void main()
|
||||
{
|
||||
worldNormal = normalize( modelNormalMatrix * vertexNormal );
|
||||
worldPosition = vec3( modelMatrix * vec4( vertexPosition, 1.0 ) );
|
||||
|
||||
gl_Position = modelViewProjection * vec4( vertexPosition, 1.0 );
|
||||
}
|
||||
Loading…
Reference in New Issue