Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: daemon: new shader format #5

Open
wants to merge 1 commit into
base: master
from

Conversation

@illwieckz
Copy link
Member

commented Jul 30, 2019

Work in progress effort for a new shader format. See DaemonEngine/Daemon#216 for why it's needed.

XreaL shader format is broken by design and there is no way to fix it.

Do not merge until the change is implemented on engine side, and shaders rewritten.

This produces this:

textures/shared_ex/light1_white_1000
{
	qer_editorImage     textures/shared_ex_src/light1_d

	q3map_surfacelight  1000
	q3map_lightRGB      1.000 1.000 1.000

	{
		diffuseMap  textures/shared_ex_src/light1_d
		normalMap   textures/shared_ex_src/light1_n
		specularMap textures/shared_ex_src/light1_s
		glowMap     textures/shared_ex_src/light1_a
	}
}

instead of this:

textures/shared_ex/light1_white_1000
{
	qer_editorImage     textures/shared_ex_src/light1_d

	q3map_surfacelight  1000
	q3map_lightRGB      1.000 1.000 1.000

	diffuseMap  textures/shared_ex_src/light1_d
	normalMap   textures/shared_ex_src/light1_n
	specularMap textures/shared_ex_src/light1_s
	glowMap     textures/shared_ex_src/light1_a
}

This would help to reduce a huge amount of easily-brekable collapse line code, to avoid duplicate “diffuseMap” parsing in both shader (variable) and stage parser (value), to make possible multitexture terrain materials, etc.

Note: why not drop the code targetting xreal renderer? I highly doubt it will have any usage anymore…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.