Archive 17/01/2023.

Light brightness multiplier in shaders?

dragonCASTjosh

After looking through the shaders i couldnt find the name of the light bright multiplier option within the shader. it would be useful to have as i wish to use it as a luminous power value in PBR.

1vanK

// Negative lights will use subtract blending, so write absolute RGB values to the shader parameter graphics->SetShaderParameter(PSP_LIGHTCOLOR, Color(light->GetEffectiveColor().Abs(), light->GetEffectiveSpecularIntensity()) * fade);

/// Return effective color, multiplied by brightness. Do not multiply the alpha so that can compare against the default black color to detect a light with no effect. Color GetEffectiveColor() const { return Color(color_ * brightness_, 1.0f); }

dragonCASTjosh

Thanks i looks like im going to have to find another solution :slight_smile: