void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreateDistantLitSpecular(GetDistantDirection(), GetWhite(), GetSurfaceScale(), GetKs(), GetShininess())); }
void onDraw(int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreatePointLitSpecular(GetPointLocation(), GetWhite(), GetSurfaceScale(), GetKs(), GetShininess())); }
void GlfSimpleMaterial::Bind() { glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, GetAmbient().GetArray()); glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, GetDiffuse().GetArray()); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, GetSpecular().GetArray()); glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, GetEmission().GetArray()); glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, GetShininess()); }
void onDraw(const int loops, SkCanvas* canvas) override { draw(loops, canvas, SkLightingImageFilter::CreateSpotLitSpecular(GetSpotLocation(), GetSpotTarget(), GetSpotExponent(), GetCutoffAngle(), GetWhite(), GetSurfaceScale(), GetKs(), GetShininess())); }
//???????????????????????????????????????????????????????????????????????? // The stdID parameter doesn't really have a meaning in this case. // bool Matte::EvalMonoStdChannel ( ShadeContext& sc, // describes context of evaluation int stdID, // must be ID_AM, ect float& outVal // output var ) { switch ( stdID ) { case ID_BU: // Bump (value 8) case ID_RR: // Refraction (value 10) case ID_DP: // Displacement (value 11) case ID_SI: // Self-illumination (value 5) case ID_FI: // Filter color (value 7) return false; break; case ID_RL: // Reflection (value 9) if ( sc.doMaps && reflmap && useReflMap && reflmap->IsOutputMeaningful(sc) ) { if ( reflmap->HandleOwnViewPerturb() ) { sc.TossCache(reflmap); outVal = reflmap->EvalMono(sc); } else { AColor rcol; rcol = sc.EvalEnvironMap( reflmap, sc.ReflectVector() ); Color rc; rc = Color(rcol.r,rcol.g,rcol.b)*reflAmt; outVal = Intens(rc); } } else return false; break; case ID_AM: // Ambient (value 0) outVal = Intens( GetAmbient() ); break; case ID_DI: // Diffuse (value 1) outVal = Intens( GetDiffuse() ); break; case ID_SP: // Specular (value 2) outVal = Intens( GetSpecular() ); break; case ID_SH: // Shininess (value 3). In R3 and later this is called Glossiness. outVal = GetShininess(); break; case ID_SS: // Shininess strength (value 4). In R3 and later this is called Specular Level. outVal = GetShinStr(); break; case ID_OP: // Opacity (value 6) outVal = GetXParency(); break; default: // Should never happen //DbgAssert( false ); return false; break; } return true; }