FIxing coding standards

This commit is contained in:
samcake 2016-01-21 16:44:35 -08:00
parent 9c344c6498
commit 402809fe2f
2 changed files with 13 additions and 12 deletions

View file

@ -210,7 +210,8 @@ void AmbientOcclusionEffect::setDepthInfo(float nearZ, float farZ) {
} }
void AmbientOcclusionEffect::setResolutionLevel(int level) { void AmbientOcclusionEffect::setResolutionLevel(int level) {
level = std::max(0, std::min(level, 4)); const int MAX_RESOLUTION_LEVEL = 4;
level = std::max(0, std::min(level, MAX_RESOLUTION_LEVEL));
if (level != getResolutionLevel()) { if (level != getResolutionLevel()) {
auto& current = _parametersBuffer.edit<Parameters>().resolutionInfo; auto& current = _parametersBuffer.edit<Parameters>().resolutionInfo;
current.x = (float)level; current.x = (float)level;

View file

@ -74,18 +74,18 @@ public:
class AmbientOcclusion { class AmbientOcclusion {
public: public:
int resolutionLevel = 1; int resolutionLevel { 1 };
float radius = 0.5f; // radius in meters of the AO effect float radius { 0.5f }; // radius in meters of the AO effect
float level = 0.5f; // Level of the obscrance value float level { 0.5f }; // Level of the obscrance value
int numSamples = 11; // Num Samples per pixel int numSamples { 11 }; // Num Samples per pixel
float numSpiralTurns = 7.0f; float numSpiralTurns { 7.0f };
bool ditheringEnabled = true; bool ditheringEnabled { true };
float falloffBias = 0.01f; float falloffBias { 0.01f };
float edgeSharpness = 1.0f; float edgeSharpness { 1.0f };
int blurRadius = 4; int blurRadius { 4 };
float blurDeviation = 2.5f; float blurDeviation { 2.5f};
double gpuTime = 0.0; double gpuTime { 0.0 };
}; };
RenderContext(ItemsConfig items, Tone tone, AmbientOcclusion ao, int drawStatus, bool drawHitEffect, glm::vec4 deferredDebugSize, int deferredDebugMode); RenderContext(ItemsConfig items, Tone tone, AmbientOcclusion ao, int drawStatus, bool drawHitEffect, glm::vec4 deferredDebugSize, int deferredDebugMode);