Skip to content

Commit

Permalink
Merge pull request #75 from Terasology/chore/qaplug-findings
Browse files Browse the repository at this point in the history
refactor: address IntelliJ QAPlug plugin findings
  • Loading branch information
soloturn authored Dec 10, 2023
2 parents 7320425 + e8750ca commit b01eb17
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,9 @@ public void process() {
lightGeometryMaterial.setInt("texSceneOpaqueNormals", 1, true);
lightGeometryMaterial.setMatrix4("viewProjMatrix", activeCamera.getViewProjectionMatrix());

if (renderingConfig.isDynamicShadows()) {
if (renderingConfig.isCloudShadows()) {
lightGeometryMaterial.setFloat("time", worldProvider.getTime().getDays(), true);
lightGeometryMaterial.setFloat3("cameraPosition", cameraPosition, true);
}
if (renderingConfig.isDynamicShadows() && renderingConfig.isCloudShadows()) {
lightGeometryMaterial.setFloat("time", worldProvider.getTime().getDays(), true);
lightGeometryMaterial.setFloat3("cameraPosition", cameraPosition, true);
}

if (renderingConfig.isDynamicShadows()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
public class FinalPostProcessingNode extends AbstractNode implements PropertyChangeListener {
public static final SimpleUri POST_FBO_URI = new SimpleUri("engine:fbo.finalBuffer");
private static final ResourceUrn POST_MATERIAL_URN = new ResourceUrn("CoreRendering:post");
private static final int noiseTextureSize = 1024;

Check warning on line 56 in src/main/java/org/terasology/corerendering/rendering/dag/nodes/FinalPostProcessingNode.java

View check run for this annotation

Terasology Jenkins.io / CheckStyle

ConstantNameCheck

LOW: Name 'noiseTextureSize' must match pattern '^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|logger)$'.
Raw output
<p> Checks that constant names conform to a format specified by the format property. A <em>constant</em> is a <strong>static</strong> and <strong>final</strong> field or an interface/annotation field, except <strong>serialVersionUID</strong> and <strong>serialPersistentFields</strong>. </p>

private WorldRenderer worldRenderer;
private RenderingConfig renderingConfig;
Expand All @@ -78,7 +79,6 @@ public class FinalPostProcessingNode extends AbstractNode implements PropertyCha

private Vector3f tint = new Vector3f(.0f, .0f, .0f);

private final int noiseTextureSize = 1024;

public FinalPostProcessingNode(String nodeUri, Name providingModule, Context context) {
super(nodeUri, providingModule, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public SimpleBlendMaterialsNode(String nodeUri, Name providingModule, Context co

@Override
public void setDependencies(Context context) {
Camera playerCamera = context.get(WorldRenderer.class).getActiveCamera();

BufferPairConnection bufferPairConnection = getInputBufferPairConnection(1);
addOutputBufferPairConnection(1, bufferPairConnection);
addOutputFboConnection(1, bufferPairConnection.getBufferPair().getPrimaryFbo());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public WorldReflectionNode(String nodeUri, Name providingModule, Context context
public void setDependencies(Context context) {
addDesiredStateChange(new ReflectedCamera(activeCamera)); // this has to go before the LookThrough state change

DisplayResolutionDependentFbo displayResolutionDependentFBOs = context.get(DisplayResolutionDependentFbo.class);
FBO reflectedFbo = getInputFboData(1);
addOutputFboConnection(1, reflectedFbo);
addDesiredStateChange(new BindFbo(reflectedFbo));
Expand Down

0 comments on commit b01eb17

Please sign in to comment.