Merge of Peter and Kelly changes
--HG-- branch : nfb
This commit is contained in:
@@ -57,10 +57,10 @@ void KRPointLight::render(KRCamera *pCamera, std::vector<KRPointLight *> &point_
|
||||
KRVector3 light_position = getLocalTranslation();
|
||||
|
||||
float influence_radius = m_decayStart - sqrt(m_intensity * 0.01f) / sqrt(KRLIGHT_MIN_INFLUENCE);
|
||||
|
||||
|
||||
KRMat4 sphereModelMatrix = KRMat4();
|
||||
sphereModelMatrix.scale(influence_radius);
|
||||
sphereModelMatrix.translate(light_position.x, light_position.y, light_position.z);
|
||||
sphereModelMatrix.scale(influence_radius);
|
||||
|
||||
if(viewport.visible(getBounds())) { // Cull out any lights not within the view frustrum
|
||||
|
||||
|
||||
@@ -926,7 +926,8 @@ void LoadNode(FbxScene* pFbxScene, KRNode *parent_node, FbxGeometryConverter *pG
|
||||
KRVector3 node_pre_rotation, node_post_rotation;
|
||||
if(rotation_active) {
|
||||
node_pre_rotation = KRVector3(pre_rotation[0], pre_rotation[1], pre_rotation[2]) / 180.0 * M_PI;
|
||||
node_post_rotation = KRVector3(post_rotation[0], post_rotation[1], post_rotation[2]) / 180.0 * M_PI;
|
||||
// node_post_rotation = KRVector3(post_rotation[0], post_rotation[1], post_rotation[2]) / 180.0 * M_PI;
|
||||
//&KRF HACK removing this line (above) to prevent the post rotation from corrupting the default light values; the FBX is importing a post rotation and setting it to -90 degrees
|
||||
} else {
|
||||
node_pre_rotation = KRVector3::Zero();
|
||||
node_post_rotation = KRVector3::Zero();
|
||||
|
||||
@@ -38,5 +38,5 @@ varying mediump vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
texCoord = vertex_uv;
|
||||
gl_Position = mvp_matrix * vec4(0.0, 0.0, 0.0, 1.0) + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 1.0, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size;
|
||||
gl_Position = mvp_matrix * vec4(0.0, 0.0, 0.0, 1.0) + vec4(vertex_uv.x * viewport.w / viewport.z * 2.0 - 0.75, vertex_uv.y * 2.0 - 1.0, 0.0, 0.0) * flare_size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user