Jump to content

Programmer (Graphics, Gameplay, AI) - Mikita Hradovich (yet another (game) developer wants to participate)


nikagra
 Share

Recommended Posts

#elif and #include support is quite easy to implement. #elif should be very similar to #if, to implement #include one should add contents of included file and recursively run preprocessor on it (maybe limit maximum number of include levels to prevent circular dependencies). This two should take up to 3-4 days of work

Expressions in #define is a non-trivial feature. It's hard to estimate it at this point

  • Like 1
Link to comment
Share on other sites

Initial implementation of #include directive is ready.

This is only initial implementation. I'm also not sure if it works in every case (probably not) and it still has some limitations, e.g. changes in included files are not tracked by file system. Preprocessor is designed to operate on single string buffer, if we want to include another file we have to overcome this limitation. I've chosen to create deep copies of included macros and attach them and preprocessed include file to main (current processing shader) file.

You can test this changes with Skirmish map type Acropolis Bay (2). I've prepared some testing shaders. Check header.glsl and edge_detection.vs

What do you think?

preprocessor_include_initial_impl.zip

Edited by nikagra
Link to comment
Share on other sites

nikagra,my friend! Your patch is very good, this is a great attempt, I personally think that SMAA will bring us better graphics, you do not have to worry about our computer configuration, and now the configuration of the computer has fully supported the processing of advanced graphics, so SMAA as the first option is a better choice. Thank you I think you'll do better, my friend. Come on, please keep trying to do better.

Link to comment
Share on other sites

I highly recommend use our trac to upload, submit patches, changes.

http://trac.wildfiregames.com/

I've created task for this

By the way, could you please explain why such custom preprocessor is used? According to The OpenGL® Shading Language (1.10.59) spec, all directives are supported by built-in preprocessor (no #include support for to obvious reasons). I've checked Ogre3D ssource, there is no clear explanation here also

Edited by nikagra
  • Like 1
Link to comment
Share on other sites

One comment about the patch style itself, we use tabs not spaces :)

About the submission to trac, you can submit diffs directly we have a viewer for it.

I can't really see the difference between with and without the patch, so it might be more subtle than I expected.

With

post-12287-0-85481600-1448275729_thumb.p

Without

post-12287-0-13850100-1448275731_thumb.p

Link to comment
Share on other sites

I can't really see the difference between with and without the patch, so it might be more subtle than I expected.

Patch only adds partial support for #include directive. It's too early for SMAA yet :)

Edited by nikagra
Link to comment
Share on other sites

My friend, nikagra. What I know is that the GLSL version of the 0AD game is OPENGL2.0, and the development team is developing OPENGL4.0+

Here is a patch you can refer to it, perhaps to help you.

http://trac.wildfiregames.com/ticket/3641

You can also go directly to the chat channel to go directly to Yves to discuss this matter, he is now developing the work to support OPENGL4.0+. He can help you.

http://webchat.quakenet.org/?channels=0ad

Edited by gameboy
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...