Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/BL_BlenderShader.cpp
| Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | void BL_BlenderShader::Update(const RAS_MeshSlot & ms, RAS_IRasterizer* rasty ) | ||||
| model.getValue((float*)obmat); | model.getValue((float*)obmat); | ||||
| if (ms.m_bObjectColor) | if (ms.m_bObjectColor) | ||||
| ms.m_RGBAcolor.getValue((float *)obcol); | ms.m_RGBAcolor.getValue((float *)obcol); | ||||
| else | else | ||||
| obcol[0] = obcol[1] = obcol[2] = obcol[3] = 1.0f; | obcol[0] = obcol[1] = obcol[2] = obcol[3] = 1.0f; | ||||
| float auto_bump_scale = ms.m_pDerivedMesh!=0 ? ms.m_pDerivedMesh->auto_bump_scale : 1.0f; | float auto_bump_scale = ms.m_pDerivedMesh!=0 ? ms.m_pDerivedMesh->auto_bump_scale : 1.0f; | ||||
| GPU_material_bind_uniforms(gpumat, obmat, obcol, auto_bump_scale); | GPU_material_bind_uniforms(gpumat, obmat, obcol, auto_bump_scale, NULL); | ||||
| mAlphaBlend = GPU_material_alpha_blend(gpumat, obcol); | mAlphaBlend = GPU_material_alpha_blend(gpumat, obcol); | ||||
| } | } | ||||
| int BL_BlenderShader::GetAlphaBlend() | int BL_BlenderShader::GetAlphaBlend() | ||||
| { | { | ||||
| return mAlphaBlend; | return mAlphaBlend; | ||||
| } | } | ||||
| bool BL_BlenderShader::Equals(BL_BlenderShader *blshader) | bool BL_BlenderShader::Equals(BL_BlenderShader *blshader) | ||||
| { | { | ||||
| /* to avoid unneeded state switches */ | /* to avoid unneeded state switches */ | ||||
| return (blshader && mMat == blshader->mMat && mLightLayer == blshader->mLightLayer); | return (blshader && mMat == blshader->mMat && mLightLayer == blshader->mLightLayer); | ||||
| } | } | ||||
| // eof | // eof | ||||