Jump to content
  • Sign Up

Archived

This topic is now archived and is closed to further replies.

  • 1
PotionPro32

Shaders

Question

12 answers to this question

Recommended Posts

No, It will only work for minecraft java or bedrock, Not ClassiCube, Because it don't have Shader Performance Button And Plus, Shader really won't work if its on ClassiCube...

Share this post


Link to post

well i found some GLSL in the classicube source code

/* Generates source code for a GLSL vertex shader, based on shader's flags */
static void GenVertexShader(const struct GLShader* shader, cc_string* dst) {
	int uv = shader->features & FTR_TEXTURE_UV;
	int tm = shader->features & FTR_TEX_OFFSET;

	String_AppendConst(dst,         "attribute vec3 in_pos;\n");
	String_AppendConst(dst,         "attribute vec4 in_col;\n");
	if (uv) String_AppendConst(dst, "attribute vec2 in_uv;\n");
	String_AppendConst(dst,         "varying vec4 out_col;\n");
	if (uv) String_AppendConst(dst, "varying vec2 out_uv;\n");
	String_AppendConst(dst,         "uniform mat4 mvp;\n");
	if (tm) String_AppendConst(dst, "uniform vec2 texOffset;\n");

	String_AppendConst(dst,         "void main() {\n");
	String_AppendConst(dst,         "  gl_Position = mvp * vec4(in_pos, 1.0);\n");
	String_AppendConst(dst,         "  out_col = in_col;\n");
	if (uv) String_AppendConst(dst, "  out_uv  = in_uv;\n");
	if (tm) String_AppendConst(dst, "  out_uv  = out_uv + texOffset;\n");
	String_AppendConst(dst,         "}");
}

 

Share this post


Link to post
On 7/20/2023 at 4:00 PM, MESYETI said:

well i found some GLSL in the classicube source code


/* Generates source code for a GLSL vertex shader, based on shader's flags */
static void GenVertexShader(const struct GLShader* shader, cc_string* dst) {
	int uv = shader->features & FTR_TEXTURE_UV;
	int tm = shader->features & FTR_TEX_OFFSET;

	String_AppendConst(dst,         "attribute vec3 in_pos;\n");
	String_AppendConst(dst,         "attribute vec4 in_col;\n");
	if (uv) String_AppendConst(dst, "attribute vec2 in_uv;\n");
	String_AppendConst(dst,         "varying vec4 out_col;\n");
	if (uv) String_AppendConst(dst, "varying vec2 out_uv;\n");
	String_AppendConst(dst,         "uniform mat4 mvp;\n");
	if (tm) String_AppendConst(dst, "uniform vec2 texOffset;\n");

	String_AppendConst(dst,         "void main() {\n");
	String_AppendConst(dst,         "  gl_Position = mvp * vec4(in_pos, 1.0);\n");
	String_AppendConst(dst,         "  out_col = in_col;\n");
	if (uv) String_AppendConst(dst, "  out_uv  = in_uv;\n");
	if (tm) String_AppendConst(dst, "  out_uv  = out_uv + texOffset;\n");
	String_AppendConst(dst,         "}");
}

 

Well I don't know what that is

Share this post


Link to post
11 minutes ago, PotionPro32 said:

Well I don't know what that is

it's a shader 

Share this post


Link to post
3 minutes ago, decor74 said:

Yes, i Agree what MESYETI said

That's literally incredible.

Share this post


Link to post
6 hours ago, PotionPro32 said:

But like are there any shaders that angled shadows and stuff like that.

Probably not, at least not on the old ClassicalSharp branch.

Share this post


Link to post
Just now, Caliberto77 said:

OMG this shader thing seems awesome!! i need to try it!!

uh.... what

Share this post


Link to post

×
×
  • Create New...