// otherwise the parsing code won't function correctly
while((read_pos=strchr(read_pos,'\n')))
while((read_pos=strchr(read_pos,'\n')))
{
{
read_pos--;
read_pos--;
if(*read_pos!='\r')
if(*read_pos!='\r')
{
{
CONS_Alert(CONS_ERROR,"HWR_PreprocessShader: Shader contains mixed line ending types. Please use either only LF (Unix) or only CRLF (Windows) line endings.\n");
// this file contains mixed CRLF and LF line endings.
returnNULL;
// treating it as a LF file during parsing should keep
// the results sane enough as long as the gpu driver is fine
// with these kinds of weirdly formatted shader sources.