MSFPostProcessEffect
Objective-C
@interface MSFPostProcessEffect : NSObject {
void *swigCPtr;
BOOL swigCMemOwn;
}
Swift
class MSFPostProcessEffect : NSObject
A full-screen post-processing effect: once attached via MapRenderer::setPostProcessEffect, the map renders offscreen and the GLSL ES 1.00 fragment shader writes the screen. Uniforms: docs/features/post-processing.md. Note: this class is experimental and may change or even be removed in future SDK versions.
-
Checks if this object is equal to the specified object.
Declaration
Objective-C
- (BOOL)isEqual:(id)object;Swift
func isEqual(_ object: Any!) -> BoolParameters
objectThe reference object.
Return Value
True when objects are equal, false otherwise.
-
Returns the hash value of this object.
Declaration
Objective-C
- (NSUInteger)hash;Swift
func hash() -> UIntReturn Value
The hash value of this object.
-
Constructs a post-process effect from a fragment shader.
Declaration
Objective-C
- (id)initWithName:(NSString *)name fragmentShader:(NSString *)fragmentShader;Swift
init!(name: String!, fragmentShader: String!)Parameters
nameThe name of the effect (used for shader caching, should be unique).
fragmentShaderThe GLSL ES 1.00 fragment shader source.
-
Returns the name of the effect.
Declaration
Objective-C
- (NSString *)getName;Swift
func getName() -> String!Return Value
The name of the effect.
-
Returns the fragment shader source of the effect.
Declaration
Objective-C
- (NSString *)getFragmentShader;Swift
func getFragmentShader() -> String!Return Value
The fragment shader source.
-
Returns true if the effect needs the terrain depth pre-pass (uTerrainDepthTex).
Declaration
Objective-C
- (BOOL)isTerrainDepthRequired;Swift
func isTerrainDepthRequired() -> BoolReturn Value
True if terrain depth is rendered for the effect. The default is false.
-
Sets whether the effect needs the terrain depth pre-pass.
Declaration
Objective-C
- (void)setTerrainDepthRequired:(BOOL)required;Swift
func setTerrainDepthRequired(_ required: Bool)Parameters
requiredTrue if the terrain depth should be rendered for the effect.
-
Returns true if the effect wants the terrain surface normal in the depth pre-pass.
Declaration
Objective-C
- (BOOL)isTerrainNormalsRequired;Swift
func isTerrainNormalsRequired() -> BoolReturn Value
True if the pre-pass packs normals. The default is false.
-
Sets whether the depth pre-pass packs the terrain surface normal; implies setTerrainDepthRequired. On, uTerrainDepthTex is RG sqrt depth (enc = dot(rg, vec2(1, 1/255)), depth = enc * enc, sky at enc >= 1) and BA the octahedral normal, z up, instead of RGB 24-bit linear depth and A coverage.
Declaration
Objective-C
- (void)setTerrainNormalsRequired:(BOOL)required;Swift
func setTerrainNormalsRequired(_ required: Bool)Parameters
requiredTrue if the pre-pass should pack normals.
-
Returns the value of a float parameter.
Declaration
Objective-C
- (float)getFloatParameter:(NSString *)name;Swift
func getFloatParameter(_ name: String!) -> FloatParameters
nameThe name of the parameter.
Return Value
The value of the parameter, or 0 if not set.
-
Sets a float parameter. The parameter is exposed to the fragment shader as a uniform.
Declaration
Objective-C
- (void)setFloatParameter:(NSString *)name value:(float)value;Swift
func setFloatParameter(_ name: String!, value: Float)Parameters
nameThe name of the parameter (must be a valid GLSL identifier).
valueThe new value for the parameter.
-
Sets a color parameter. The parameter is exposed to the fragment shader as a vec4 uniform with components in the 0..1 range.
Declaration
Objective-C
- (void)setColorParameter:(NSString *)name color:(MSFColor *)color;Swift
func setColorParameter(_ name: String!, color: MSFColor!)Parameters
nameThe name of the parameter (must be a valid GLSL identifier).
colorThe new value for the parameter.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;Swift
func dealloc()