J3M: allow static pass lighting to be selected
This commit is contained in:
parent
091b8664ad
commit
e71cf81b96
@ -94,6 +94,17 @@ public class TechniqueDef implements Savable {
|
||||
*/
|
||||
@Deprecated
|
||||
FixedPipeline,
|
||||
/**
|
||||
* Similar to {@link #SinglePass} except the type of each light is known
|
||||
* at shader compile time.
|
||||
* <p>
|
||||
* The advantage is that the shader can be much more efficient, i.e. not
|
||||
* do operations required for spot and point lights if it knows the
|
||||
* light is a directional light. The disadvantage is that the number of
|
||||
* shaders used balloons because of the variations in the number of
|
||||
* lights used by objects.
|
||||
*/
|
||||
StaticPass
|
||||
}
|
||||
|
||||
public enum ShadowMode {
|
||||
|
@ -41,6 +41,7 @@ import com.jme3.material.RenderState.BlendMode;
|
||||
import com.jme3.material.RenderState.FaceCullMode;
|
||||
import com.jme3.material.TechniqueDef.LightMode;
|
||||
import com.jme3.material.TechniqueDef.ShadowMode;
|
||||
import com.jme3.material.logic.StaticPassLightingLogic;
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector2f;
|
||||
import com.jme3.math.Vector3f;
|
||||
@ -646,6 +647,9 @@ public class J3MLoader implements AssetLoader {
|
||||
case SinglePass:
|
||||
technique.setLogic(new SinglePassLightingLogic(technique));
|
||||
break;
|
||||
case StaticPass:
|
||||
technique.setLogic(new StaticPassLightingLogic(technique));
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user