Comunidad Game Maker

Ayuda => Preguntas y respuestas => Mensaje iniciado por: Yuki Nagato en Marzo 09, 2022, 04:51:21 AM

Título: hacer el sprite blanco
Publicado por: Yuki Nagato en Marzo 09, 2022, 04:51:21 AM
hola como hago para que el sprite se ponga totalmente blanco en tiempo real? :) :GMS:
Título: Re: hacer el sprite blanco
Publicado por: anael en Marzo 09, 2022, 05:32:45 AM
Hola, este video te puede servir

https://www.youtube.com/watch?v=W_BOkHhKP4Q
Título: Re: hacer el sprite blanco
Publicado por: Jeffrey Faper en Marzo 09, 2022, 05:46:53 AM
No encontre el manual de Game Maker pero sin shaders creo que era algo asi
EVENTO DRAW:
[gml]
//usando funciones 3d NO SHADER
d3d_set_fog(true,c_white,0,0);
//AQUI DIBUJA SU SPRITE
d3d_set_fog(true,c_white,0,0);

//usando un shader
shader_set(shader0);
//AQUI DIBUJA SU SPRITE
shader_reset();

//CREA UN SHADER Y PEGA ESTO EN LA PESTAÑA FRAGMENT
//
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;


void main()
{   
    vec4 c = texture2D(gm_BaseTexture, v_vTexcoord);
    gl_FragColor = vec4(1.0,1.0,1.0,c.a);

}
[/gml]


Título: Re: hacer el sprite blanco
Publicado por: Yuki Nagato en Marzo 09, 2022, 10:37:16 PM
gracias por responder ;D
hoy a la tarde encontre esta info adicional en el manual mismo XD
https://manual-en.yoyogames.com/#t=Additional_Information%2FGuide_To_Using_Shaders.htm&rhsearch=path