[vlc-devel] [PATCH] Direct3D shader support (HLSL)

xxcv xxcv07 at gmail.com
Tue Aug 17 01:22:21 CEST 2010

On 17/08/2010 8:45 AM, Sasha Koruga wrote:
> Hey Guys,
>> IMO,
>> Maybe you can place pixelShader.fx in plugins directory.
> I'd love to. How do I fetch that directory, though?
You can do it the hard way or ask courmisch about it.
Afaict, the hard-way is at src/win32/specific.c under,
  * system_Init: initialize winsock and misc other things.

>> Then maybe you should create a sort of configure file for your
>> pixelShader.fx file or a complete shaders list =
>> convertbt,widen,detect,gamma18,gamma22,gammabt,invert,grayscale
>> And a corresponding settings under vlcrc if you want to save settings of
>> which effects are actively enabled.
>> This will involve changing the core's config, or probably you can do this in
>> the module itself.
>> Since this .fx is user configurable therefore it should be parsed at
>> run-time don't you think so ? Otherwise then there's no point for a separate
>> .fx file if everything is hard-coded.
> If I understand you correctly, this is already what I'm planning to
> do. I plan to have a line at the top of the .fx file that is something
> like:
> //converbt, widen, detect, someNewShader
> And that first line will be read in by direct3d.c and used to populate
> the options list.
You're right, probably something like that. Once you have read all the 
available shader effects then there will be more problems when user 
changes any of the shaders list.
Then again, it can be something intelligent as retrieve the settings 
from vlcrc and it contradicts how options are used and saved.
Because you can have a shader effect saved in vlcrc as actively enabled 
then at one time user decided to remove one or more shader effects from 
the .fx file then preferences won't be able to tell if the shader effect 
has been removed from .fx file. Unless you implement some sort of 
strategy at run-time to correctly load the shaders list into a list of 

>> So for the time been I'd suggest that you follow nefrir's advices by
>> creating another header file. hmm.
> Create a new header file just for #ifndef x, #define x, #endif?

My VLC, My Way, My Style~

More information about the vlc-devel mailing list