08-15-2015, 10:57 PM
Looks like you're using Game Maker Studio by those function names.
If you want, you could use a shader to apply effects like distance fog and a static sky. I've made a photoshop shader pack that could serve as a bootstrap for making shaders in any game.
Here's a quick fog shader I cooked up just now (This would need to be applied on all objects that you want fog on, for :
If you want, you could use a shader to apply effects like distance fog and a static sky. I've made a photoshop shader pack that could serve as a bootstrap for making shaders in any game.
Here's a quick fog shader I cooked up just now (This would need to be applied on all objects that you want fog on, for :
Code:
//
// Fog Fragment
//
attribute vec3 in_Position;
attribute vec4 in_Colour;
attribute vec2 in_TextureCoord;
attribute vec3 in_Normal;
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
varying float depth;
float view_far = 10000.0;
float view_near = 1.0;
void main()
{
v_vColour = in_Colour;
v_vTexcoord = in_TextureCoord
vec4 object_space_pos = (rot * vec4(in_Position, 1.0)) + vec4(gamePosition, 0.0);
vec4 viewPos = gm_Matrices[MATRIX_WORLD_VIEW] * object_space_pos;
depth = (viewPos.z - view_near) / (view_far - view_near);
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
}