File tree Expand file tree Collapse file tree
jme3-core/src/main/java/com/jme3/renderer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7575import java .util .function .Function ;
7676import java .util .function .Predicate ;
7777import java .util .function .Supplier ;
78+ import java .util .logging .Level ;
7879import java .util .logging .Logger ;
7980
8081/**
@@ -1148,6 +1149,12 @@ public void setMaxSinglePassLightBatchSize(int maxSinglePassLightBatchSize) {
11481149 if (fragUniformVecs != null && fragUniformVecs > 0 ) {
11491150 int reservedUniforms = Math .max (fragUniformVecs / RESERVED_UNIFORM_FRACTION , 1 );
11501151 int maxByHardware = Math .max ((fragUniformVecs - reservedUniforms ) / VEC4_UNIFORMS_PER_LIGHT , 1 );
1152+ if (this .maxSinglePassLightBatchSize > 16 && maxByHardware < 16 ) {
1153+ logger .log (Level .WARNING ,
1154+ "setMaxSinglePassLightBatchSize({0}) was requested but hardware only supports"
1155+ + " {1} lights per pass (FragmentUniformVectors={2}); clamping to {1}." ,
1156+ new Object []{maxSinglePassLightBatchSize , maxByHardware , fragUniformVecs });
1157+ }
11511158 this .maxSinglePassLightBatchSize = Math .min (this .maxSinglePassLightBatchSize , maxByHardware );
11521159 }
11531160 if (singlePassLightBatchSize > this .maxSinglePassLightBatchSize ) {
You can’t perform that action at this time.
0 commit comments