libretro / slang-shaders

224 stars 93 forks source link

License? #150

Open guoyunhe opened 4 years ago

guoyunhe commented 4 years ago

What is the license of this repo?

guoyunhe commented 4 years ago

Here is no LICENSE file in this repo.

hizzlekizzle commented 4 years ago

It's many different licenses, some GPL, some MIT, some public domain, some with no license listed.

guoyunhe commented 4 years ago

It is good to mention which shader is GPL/MIT/public domain/no license. Otherwise, there is the copyright risk for the project. You cannot modify or redistribute the shader code if the author doesn't allow it.

Apteryks commented 3 days ago

If we could have some commitment from the maintainers of this repo to only accept properly licensed shader sources from now on, I could try coming up with a list of the licenses and see which are the problematic ones (such has lacking any license information).

Without such commitment, it seems unwise of my time to do this effort as any new commit could be adding more problematic sources.

What do you think? Perhaps the short SPDX identifiers could be used? There is a nifty reuse tool that could run in the CI on new contributions to ensure they are properly annotated.

Apteryks commented 3 days ago

At least this one looks problematic: anti-aliasing/shaders/ewa_curvature.slang:

#version 450

/**
* Practical Elliptical Texture Filtering on the GPU
* Copyright 2010-2011 Pavlos Mavridis, All rights reserved.
*
* Version: 0.6 - 12 / 7 / 2011 (DD/MM/YY)
*/
hizzlekizzle commented 3 days ago

You're welcome to make contributions but those contributions wouldn't entitle you to dictate how the repo is maintained.

I'm not sure whether that's actually the license for the code itself or just a citation for a paper used as reference (i.e., whether it's a direct copy/paste job of restricted code or not). That code is apparently based heavily on code from this guy's master's thesis, which doesn't appear to have any license on it. That said, I don't have any way of contacting TorridGristle anymore to find out any additional details, so might be best to pull it.

Apteryks commented 1 day ago

Hi! I've started looking into this. I think these could be considered project files (own work)?

- README.md
- spec/SHADER_SPEC.md
- stock.slang (?)
- test/*

A beginning would be to say that these are GPLv3+/Expat/ any free software of your choosing somewhere (README.md?), and put that LICENSE or COPYING file at the root of the repo. The README.md could say that any other files copyright/licenses are their originals, which ought to be identified.

I'm not sure if stock.slang is original work. It's very short and seems used by many others .slang sources, but its license is not mentioned.

hizzlekizzle commented 14 hours ago

I don't think stock.slang is copyrightable as it's not really expressing anything, it's just a passthru. https://softwareengineering.stackexchange.com/questions/240930/whats-the-copyright-status-of-boilerplate-code

EDIT: for that matter, if we're going by the 15-line rule, many, many shaders are at or below that threshold if you restrict the calculation to the non-boilerplate code (i.e., changes from stock.slang).

Apteryks commented 1 hour ago

I'd prefer not pretend I'm a copyright lawyer and refer to some stated information in the README.md, perhaps something concise such as:

# License
The few original files of this project (listed below) are provided under the Expat license (see the `LICENSE` file for its full text). An alternative could be to declare these to use CC0 (https://creativecommons.org/public-domain/cc0/).
- README
- tests/*
- include/compat_macros.h
[...]

All other projects aggregated in this collection retain their original license, which include various copyleft (GPLv3+, GPLv2+, GPLv3, GPLv2) as well as permissive (Expat, BSD-2, BSD-3, ISC, CC0, public domain, etc.) licenses.

Alternatively, instead of an explicit listing of files that would easily become outdated, a better option would be to directly annotate these with SPDX license comments, e.g:

#file: stock.slang
# SPDX-FileCopyrightText: YYYY someone <someone@email.com>
#
# SPDX-License-Identifier: CC0-1.0

This can be done and automated with the reuse tool [0].

[0] https://reuse.software/